When I use FStreamableManager::RequestAsyncLoad to load objs in pak, it returned warnings . And Loading-Objs is failed!
[2017.07.17-13.30.42:665] 67]LogLinker:Warning: The file '../../../mankuH/Content/DOT.uasset' contains unrecognizable data, check that it is of the expected type.
[2017.07.17-13.30.42:665] 67]LogLinker:Warning: The file '../../../mankuH/Content/boxMesh.uasset' contains unrecognizable data, check that it is of the expected type.
[2017.07.17-13.30.42:665] 67]LogLinker:Warning: The file '../../../mankuH/Content/texture/hx3.uasset' contains unrecognizable data, check that it is of the expected type.
[2017.07.17-13.30.42:681] 68]AsyncLoadComplete()!!!
The code is here:
FString objPath = "/Game/DOT.DOT";
FString objPath2 = "StaticMesh'/Game/boxMesh.boxMesh'";
res.arryObjPaths.Add(objPath);
res.arryObjPaths.Add(objPath2);
....
FStringAssetReference reference ( objsArry[0]);
FStringAssetReference reference2 (objsArry[1]);
FStringAssetReference reference3 (TEXT("/Game/texture/hx3.hx3"));
StreamableAssetLoader.RequestAsyncLoad(resourcesOnLoad[ID_ON_LOAD]->ItemsToStream, FStreamableDelegate::CreateUObject(this, &UResourcesController::AsyncLoadComplete));
I found this error in UE4 wiki,many developer got this error , but there is no solution .
I used UObjectLibrary to get the asset reference , but UObjectLibrary seems can’t work for Paks’ assets.
I used
Async<void>(EAsyncExecution::ThreadPool, =]() { return LoadObjectsFromArry(resourcesOnLoad[ID_ON_LOAD]->arryObjPaths); }, =]() { return AsyncLoadComplete(); });
but LoadObject<UObject> will be broken in Async-Thread, so I’m confused now ,How to Dynamic load pak assets???