RequestAsyncLoad can't find assets in packaged game
I can't load objects from a pak file in a packaged game.
I tried this:
In both cases i get the following error:
It works well in PIE and in Standalone Game, but not in the packaged game (using pak file, didn't try wihout).
I have added the directories to cook in the packaging settings and i can see them being cooked in the logs.
I can check that Lib00SoftObjectPaths.Num() contents exactly the number of assets in the directory.
So i am quite sure that the assets are present, yet i get this error.
In case it helps, i am using the UObjectLibrary::LoadBlueprintAssetDataFromPath function to load the asset data in a FAssetData Array, on which i apply ToSoftObjectPath (on each element in a loop).
I couldn't get UAssetManager::GetPrimaryAssetPathList working (still don't know if it's a bug or me incorrectly using it), that's why i still use UObjectLibrary.
asked Nov 25 '17 at 09:51 AM in Bug Reports
Ok, i found a working solution.
I was doing this (works in PIE only):
And the solution was to do this (works in PIE and packaged game):
What i don't understand is why is the engine making things so difficult with blueprints ?
Knowing that there is a way to load them dynamically, why not make as simple as FSoftObjectPath::LoadBlueprint() ?
All the best Cedric
answered Dec 06 '17 at 06:53 PM
Hello mate! And thanks for your solution. I have the same problem. Just I would like to ask if you use your above code, after requestAsyncLoad ( in a callback) . Or you ignore it completely? Because i am looking for an asynchronous solution.
answered Dec 06 '17 at 10:30 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here