TL;DR: I want to load a pak file, made in a project “B”, in the build of an “A” project.
Details:
I’m develping a software with N-th levels and a common menu level.
Now i’ve a Main project with the Menu level, and a first N-th level. (let’s call them MenuLevel and 1_Level)
Now the game read a Json file, to build a dynamic number of buttons in the MenuLevel. Every buttons have an “open level” towards the various actually "installed " N_Level.
Then, I made a Build with only the logic and the MenuLevel. And I made another Build, with only the 1_Level.
After that, I copy the .pak from the second build to the pak folder of the first build. I start the game and unreal load both the pak files, letting me to open either MenuLevel and 1_Level. OK
BUT, i would love to have N-th projects, one for every levels I’ll build, and the possibility to add a number of .pak files to the Main build, and load all the new levels!
But when I duplicate the project, and change the name of it, it won’t work anymore.
So,
I’m continuing to try new ways… now I kinda make it work, but is an unpleasant workaround:
I’m building all the projects not using .pak, then i collect from the various prjects all the .uasset folders i want, with the .umap files inside, and collect them in the main project build Content folder. it’s working and appear to be also pretty flexible.
the two problem are that the build is quite heavier when installed.
Hi Paul,
the thing is very very tricky:
using paks without going down on c++ code is strictly usable in the production of a single ue4 project and its DLCs or “patches”. when you try to put a pak of an external project inside the builded projet A
the system have problem with the naming of the folders and other things, and it can’t run the content in the pak.
The way I found that work is overall complex and not yet “stable”. I made a c++ class, and inside of it I run some code that “mount” the new pak, then you have to “inform” unreal that it has a new path where it can find content. The worst part is that you need an external source of information about the name of the pack and the content inside, is not an automatic process…
It seems promising, but we’re waiting on best improvement in this field from the UE4 dev team.
I advise you to document yourself about this thing of “mounting” pack via code