Package non-asset file and load them at runtime

Hi, I am Ulyss and new to UE4.

I got a problems about packging non-asset file and load content in the pak file.

I use json to create my game content, so I need to load json at runtime.

I know I can just use “Add additional non-asset directory to copy” to let json can be copied to my packaged game directory. So that I can load json at runtime and it works fine.

But if I want to package json files into the pak file, what should I do to load them from pak file at runtime?

I see there are some functions about pakfile in the documentation, but I don’t know how to use them to load pak using C++.

Another question is I am not very sure how package works.

If I use “Add additional non-asset directory to package” to add directory contains json files to .pak file, whether that directory will actually be added into pak file?

Hope that someone can help me solve these problems.

bump; has anyone looked into this problem yet? I’m also curious about including JSON in a packaged build as I seem to be having similar issues in my project.

Hello,

I’ve found a few posts that may be of assistance to you:

Let me know if you have any further questions regarding this process.

Have a great day

1 Like