x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Where to store game information

Hello,

I wish to create a file with dialogs, quest for NPC. It will be a json file. I want to load the json in my C++ code. The subject is not about read the file but to know where in the project (VS or Editor//asset) to be able to load it after I package the game.

It can't be on an absolute path like (c:\game\myuegame\file.json).

Thank you

Product Version: UE 4.12
Tags:
more ▼

asked Jul 06 '16 at 10:55 AM in Packaging & Deployment

avatar image

thyshimrod
399 22 11 39

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

I think you're looking for FPlatformProcess::BaseDir(), and should be storing your json file some place within the game's installation/base folder. See:

https://wiki.unrealengine.com/Packaged_Game_Paths,_Obtain_Directories_Based_on_Executable_Location

Hope this helps!

more ▼

answered Jul 06 '16 at 11:56 AM

avatar image

braindigitalis
165 7 9 12

(comments are locked)
10|2000 characters needed characters left

Hey, you wouldn't be able to put the json file in the editor because unreal engine would not pick it up as a file unless you turn it into a UCLASS.

more ▼

answered Jul 06 '16 at 11:39 AM

avatar image

Moynzy
219 19 17 24

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question