Packaging non-asset directories into their own chunk?

Probably not exactly like that, but similar. Let me explain:

/Game/Config/DefaultEngine.ini is a very weird path: It starts with /Game/... which suggests a content directory. You usually have the content directory directly next to your MyProject.uproject file (simply named Content), which is mapped to a virtual Unreal filesystem (or something like that) as /Game/..., so a file inside the content folder named ABC.uasset can be referenced as /Game/ABC. You very likely don’t have your config files inside that content directory, but next to it.

The next big thing is, you (most probably) don’t want to pack your DefaultEngine.ini file into the pak. Unreal has its own solution for including the config files in a packaged game (I don’t know the details here, but the configs are in fact there).

+Files= is most probably a relative path, the question is, relative to what. Sometimes Unreal has relative paths to the .uproject file, sometimes to the /Game/ content directory. Maybe the mentioned Engine/Config/BasePakFileRules.ini file has more detail on that. I also already deleted my test project which had that config, sadly, but I’d first try with relative to the /Game/ content directory. It’s also possible (or maybe even likely) that packaging only works for files within that game content directory (or other content directories, like engine, plugins, …), so it’s possible that you can’t even package content outside the content directory. I’d have to check the sources first to find out more

So, for packaging a file in Content/MyFolder/MyTestFile.txt I’d start testing with +Files="MyFolder/MyTestFile.txt", but you have to test it; I might be wrong.

The sample BasePakFileRules.ini file makes me think that paths relative to the config directory might also work. Good luck finding the correct answer (let us know :slight_smile:)

1 Like