Indeed there is a problem when packaging a file.
If you want to create from a new project here is the step :
- Create a new c++ project. ;
- Import code from AssetStreamer, ImportPakFile and Singleton";link text
- In the Project.Build.cs add in public dependency the string “PakFile”, “StreamingFile”;link text
- In the project settings>General settings seleect the Singleton class for Game Singleton Class;
- Create a blueprint class from the ImportPakFile and place the actor in the world;
- Create a package and move it to your project directory/Paks/ExternalContent (path to create) [Optoinally] To change the loading path, you need to change it in the ImportPakFile in the function RunLoad(). It should take each package in the directory.
- To run the crash you have to run th RunLoad() function
You will find attached the c++ and cs file defined (there are the same as in the testlevel.
I try to load a dynamically a 3D object. The problem is that I can’t load in game FBX file and because the file loaded are numerous and very big. In addition as the game will evolve in time, we don’t want to repackage each time the game, we choose to load the package file generated by the UnrealPak.exe. Maybe there is another solution but I am not aware of this.