Hello,
I am using ObjectLibrary to load many blueprint actors paths in a specific folder:
if (!ObjectLibrary)
{
ObjectLibrary = UObjectLibrary::CreateLibrary(BaseClass, true, GIsEditor);
ObjectLibrary->AddToRoot();
}
ObjectLibrary->LoadBluePrintAssetDataFromPath(TEXT("/Game/FolderWithActorBluePrints");
TArray<FAssetData> AssetDatas;
ObjectLibrary->GetAssetDataList(AssetDatas);
And then Streamable.RequestAsyncLoad to fully load one random blueprint( and I guess all it’s textures) from the library:
FStreamableManager& Streamable = UGameGlobals::Get().StreamableManager;
Streamable.RequestAsyncLoad(AssetDatas[randomIndex].ToSoftObjectPath(),
FStreamableDelegate::CreateUObject(this, &MyClass::CallBackFunc));
In my CallBackFunc, I get the reference using:
AssetDatas[randomIndex].ToSoftObjectPath().ResolveObject();
Why I am getting nullptr in packaged/standalone game but not in Editor? Any ideas how to solve my issue?
PS. I get this Fatal error:
[File:D:\Build++UE4+Release-4.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: ‘’
Thanks in advance guys!