Hey,
I’ve been attempting to use this plugin with UE 4.25.4 for the last few days, with no luck, I’ve followed the documentation perfectly and checked the forum to check for anybody with the same issue. I’m successfully mounting a Pak file, but then no matter how I try to load a class from said file, it results in a fatal error. Logging is also not working(?). Here’s how I’m mounting the pak file (taken from example project):
- Enable Runtime Logging (path = content folder)
- Get the address to the pak file with a dialog box, (eg, “c:/users/person/documents/Modding.PAK”)
- Is it a valid PAK file? If yes, mount it
Filename = above path (this is always correct, I’ve checked). Mount path = blank.
- Has it mounted? If yes, Register Mount Point.
Mount Point = “/Modding/”. Content Path = “…/…/…/ProjectEscapeRedux/Plugins/Modding/Content/”
- Load Asset Registry File
Path = “…/…/…/ProjectEscapeRedux/Plugins/Modding/AssetRegistry.bin”
This works perfectly, no crashes. I can list out the registry for this path and all contents of my external pak file gets listed. Because logging isn’t working I’m listing everything to widgets on the screen (it’s in shipping mode so no print strings). Using “get files in pak directory” using this filename (…/…/…/ProjectEscapeRedux) works too, all gets listed. Here’s what I do next:
- Get all files in pak directory. For Each, check if it’s a .uasset file. If so, then get the file directory (from the for each statement) and attempt to "get pak file class " before casting to type “actor class” (impure cast). This results in fatal crash. I also tried “converting the filename to long package name” which also results in a fatal crash. Finally, I tried appending the package name (without the extension) to the mount point name (so it looks like “/Modding/ThisIsAMod”), then getting the class and casting, this doesn’t work either.
- I gave up on this approach, maybe I’m doing something wrong. Instead, I’ve got the asset registry by path ("/Modding/"), then for each one, I get the class (or asset, i tried both) convert to soft object reference, and cast it to the actor class type. This didn’t work, so I’ve grabbed each object in the foreach, “to soft object path”, then “load asset blocking”, and regardless what I do after that I get the fatal crash again (with no error message).
Please give me some light as to why it’s not working, the secondary issue of having no logging also doesn’t help. I just need to load the pak file, and get the reference to each blueprint found in the file (actor class), i can’t predefine what the files will be so it needs to be dynamic, without c++ if possible. Here’s the structure to the pak file, I’ve removed most to save space:
- LogPakFile: Display: Mount point …/…/…/ProjectEscapeRedux/Plugins/Modding/
- LogPakFile: Display: “AssetRegistry.bin” offset: 0, size: 1360 bytes
- LogPakFile: Display: “Content/Assets/Raingutter_a_c1.uasset” offset: 1433, size: 406 bytes
- LogPakFile: Display: “Content/ReallyCoolMod.uexp” offset: 214922, size: 614 bytes
- LogPakFile: Display: “Content/ShaderArchive-Modding-PCD3D_SM5.ushaderbytecode” offset: 217088, size: 26842 bytes
- LogPakFile: Display: “Metadata/DevelopmentAssetRegistry.bin” offset: 245760, size: 85260 bytes