Issue with loading assets in a packaged environment [C++]

My current project is fully working whilst playing in editor but if i package my game into development|debuggames|shipping it will function up until it tries to use specific objects it “cannot find” despite being in the produced package (checked assetregistry + it sounds dumb but FModel too), ive tried to package with every bit of content excluding none and still no luck. visible issues i have because of this is that my ingame UI doesnt load and my HDRI sky doesnt have the material (it is worldgridmaterial).strong text

If anyone has any ideas it would be much appreciated!

Looks like you’re trying to load assets by string path, but your paths are targeting the UBlueprint object in blueprint packages, instead of the corresponding generated class (UBlueprintGeneratedClass = UClass).

UBlueprint objects are editor-only data skeletons and most of them are stripped out during cook, so it’s no surprise they come out unreachable after packaging.

Can you show code where you load stuff by path ?

how i load these objects is done in a similar manor to how lyra does its LoadGameData using assetmanager, i have similar startup job but it loads a list of objects. I added static load object as a last attempt for if load synchronous fails at the time (mostly was just for testing at the time of writing this function and when i found out my game is broken when packaged). Even if i dont do any of my load stuff some actors like my hdri bp dont spawn in despite not being editor only and they are placed in the level

Hm I don’t really know how these abstraction layers are meant to be used but pretty sure it just uses StaticLoadObject under the hood.

Check the following :

  • Verify assets are present in the PAK file. Check directly with UnrealPak -List.

  • Your assets to load are SoftObjectPaths under the hood. I don’t know how they’re defined, but if possible try to append _C at the end of their path. Path to blueprint classes should look like /Game/xxx/SomeBlueprint.SomeBlueprint_C

Sorry for not providing context on the preload class my bad, it is just a data asset that contains a TArray<TSoftObjectPtr>, you are right in saying it uses staticloadobject somewhere down the line i just was trying that there as a last try incase maybe it never got to static load object or something.

Here is what unrealpak had to say, it listed all the assets that the game is “unable” to find, which means they are in the pak atleast.



Tried again with no paks and just assets in the directory and still no luck somehow (refuses to load my sky at all despite it not being set to editor only), this only occurs outside editor usage, this is a really confusing situation

Sorry I still have no idea how the PreloadList / PreloadData is populated.

Any chance you can see what it looks like in terms of raw data ? Or how do you populate it ?