How to package .txt files?

Hello, started learning Unreal just few days ago so sorry if this is a silly question or if this is not the right place to ask this.

I am using FFileHelper::LoadFileToString() and json to parse through .txt script files (I want it to be easy for our writer to edit the dialogue stats / system).

To get the folder I am using



	FString GameDir = FPaths::GameContentDir();
	FString CompleteFilePath = GameDir + Filename + ".txt";


which works fine when I have the .txt files in the Content folder and run the game in the Editor. When I look at the log from the packaged game it seems to show the path as something like “…/…/…/I_Am_Human/Content/NPCStats.txt” where as in the Editor version it was showing the full path.

But when I try to package the game the .txt files are apparently not included (I can’t open the .pak file so I am not sure). I tried copying the .txt files to the Content folder in the packaged game, but it would not work before I would disable using the .pak. Even when I disable using the .pak in the packaging settings the .txt files are not included. Is there a right way to do this? Should I be using something else than .txt file? How can I package the .txt files so that I don’t have to copy them every time I want to make a playtest build of the game?

Another question: What should I use to distribute the game / source files between different developers of the game (we live in different countries). I am used to Tortoise SVN, but is that the best way to setup it so that they can run the editor? Is it “safe” if they just TortoiseSVN Checkout the project in a folder and then somehow add that as a project in the unreal editor? What files would I need to include in that (I am assuming Content and Source, but do need to upload anything else)?

1 Like

Why don’t you put your text in a data asset?

Txt can be fixed without rebuild project.

You can add a folder to cook content to in the project packaging settings.

Thank you!

Thanks a bunch! I guess I didn’t notice the Advanced Options in the Packaging settings before :>

Thank you , this solves my problem to add Json data as text files to to the project

1 Like