I would like to know if there is a way to load pak, mount it and use uasset in it WITHOUT having the .uassets loaded in the project. My company is making ‘avatars’, 3D character (fbx + texture), and we want to give an example project for developers to allow them to use these characters but without having direct access to the fbx.
For example, I test in local, I have a .pak there: C:\Users\Username\Desktop\Test.pak made with UnrealPak.exe
This pak contain:
I get the pak and mount it here: /Game/DLC/packageName
/!\ Problem – If I ‘SyncLoad’ / ‘StaticLoadObject’ these assets, they will be available in the mount directory /Game/DLC/packageName
After a lot of research, I didn’t found anything…
I actually want to be able to import fbx + texture or pre packaged .uasset (like unity3d bundle) to UE4 project at runtime. (downloaded from server or from local path).
Is that possible? Does anyone have any idea what to do?
I’m starting to lose hope but I think it must exist because it’s possible on Unity…
yes, it is possible to do, there are lots of threads in the answerhub about it, search specifically for Pak mounting. Here is a thread with a lot of info about it and people sharing their experciences. I’ve worked on this personally and got it working but sadly I cannot share the code due to NDA, but basically what you want to do is:
Download pak into PersistentDownloadDir
Mount the pak on the root of the assets inside the pak (/Game/Paks for instance).
Use the asset registry to actually find the files.
Unload and unmount the pak after the needed assets are used or the system will block access to other assets.
Here is a thread where i posted a huge chunck of the function I made, and where I explained what I changed to make it work. Hope it helps.
So, I tried and I’m not able to get assets from the mountpoint with the AssetRegistry. I have a folder “/Game/UNPAK/” where I mount my .pak. I added a test material file in it and it’s the only one file found with AssetRegistry… (working in editor)
The mount pak needs to be the root of your original assets. For instance if you have a pak with one asset like this /Game/Materials/ExampleMaterial.uasset, your mount point must be /Game/Materials or else the asset registry will not find it. Be sure you are respecting the original structure of the pak.