LogStreamableManager: Error: RequestAsyncLoad called with empty or only null assets!
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.
for (int i = 0; i < Lib00SoftObjectPaths.Num(); i++)
{
UBlueprint* ThisObjBP = Cast<UBlueprint>(Lib00SoftObjectPaths[i].ResolveObject());
if (ThisObjBP) BPToLoad.Add(ThisObjBP->GeneratedClass);
}
And the solution was to do this (works in PIE and packaged game):
for (int i = 0; i < Lib00SoftObjectPaths.Num(); i++)
{
FString BPRef = "Blueprint'" + Lib00SoftObjectPaths[i].GetAssetPathString() + "_C'";
UClass* ThisBPClass = LoadObject<UClass>(NULL, *BPRef);
if (!ThisBPClass) continue;
BPToLoad.Add(ThisBPClass);
}
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() ?
Actually, i’m currently using UAssetManager::Get().LoadAssetList to fill my FSoftObjectPath array, but i have been trying both this one and RequestAsyncLoad and couldn’t see any difference between the two, so it’s your call.
If anyone knows a good reason to choose one over the other, i’m all ears
Anyway, whichever you choose, the solution provided here is in their callback, and the loading is done asynchronously.
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.
FYI, the message that you probably get is .18+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading.cpp] [Line: 6647] LoadPackageAsync failed to begin to load a package because the supplied package name was neither a valid long package name nor a filename of a map within a content folder: ‘’. I have see this message on “laucher settings” window