Download

AsyncLoadPrimaryAssetList function getting a linking error

When I try to use AsyncLoadPrimaryAssetList like this:


UMechAssetManager& ThisMechAssetManager =UMechAssetManager::Get();

for(auto PrimaryAssetTypeArrayItem : PrimaryAssetTypeArray)
{
            bool Success = ThisMechAssetManager.GetPrimaryAssetIdList(PrimaryAssetTypeArrayItem, PrimaryAssetIdArray);
            if (Success)
            {
                  TArray<FName> BundleData;
                  UAsyncActionLoadPrimaryAssetList* LoadItems;
                  LoadItems = UAsyncActionLoadPrimaryAssetList::AsyncLoadPrimaryAssetList(GetWorld(),PrimaryAssetIdArray,BundleData);

             }
}


I get a Linking Error like following lines and I couldnt solve it. Can anybody help me to right direction please

MechGameInstance.cpp.obj : error LNK2019: unresolved external symbol “private: static class UClass * __cdecl UAsyncActionLoadPrimaryAsset::GetPrivateStaticClass(void)” (?GetPrivateStaticClass@UAsyncActionLoadPrimaryAsset@@CAPEAVUClass@@XZ) referenced in function “class UAsyncActionLoadPrimaryAsset * __cdecl NewObject<class UAsyncActionLoadPrimaryAsset>(class UObject *)” (??$NewObject@VUAsyncActionLoadPrimaryAsset@@@@YAPEAVUAsyncActionLoadPrimaryAsset@@PEAVUObject@@@Z)
1>MechGameInstance.cpp.obj : error LNK2019: unresolved external symbol “private: static class UClass * __cdecl UAsyncActionLoadPrimaryAssetClass::GetPrivateStaticClass(void)” (?GetPrivateStaticClass@UAsyncActionLoadPrimaryAssetClass@@CAPEAVUClass@@XZ) referenced in function “class UAsyncActionLoadPrimaryAssetClass * __cdecl NewObject<class UAsyncActionLoadPrimaryAssetClass>(class UObject *)” (??$NewObject@VUAsyncActionLoadPrimaryAssetClass@@@@YAPEAVUAsyncActionLoadPrimaryAssetClass@@PEAVUObject@@@Z)
1>MechGameInstance.cpp.obj : error LNK2019: unresolved external symbol “private: static class UClass * __cdecl UAsyncActionLoadPrimaryAssetList::GetPrivateStaticClass(void)” (?GetPrivateStaticClass@UAsyncActionLoadPrimaryAssetList@@CAPEAVUClass@@XZ) referenced in function “class UAsyncActionLoadPrimaryAssetList * __cdecl NewObject<class UAsyncActionLoadPrimaryAssetList>(class UObject *)” (??$NewObject@VUAsyncActionLoadPrimaryAssetList@@@@YAPEAVUAsyncActionLoadPrimaryAssetList@@PEAVUObject@@@Z)
1>MechGameInstance.cpp.obj : error LNK2019: unresolved external symbol “private: static class UClass * __cdecl UAsyncActionLoadPrimaryAssetClassList::GetPrivateStaticClass(void)” (?GetPrivateStaticClass@UAsyncActionLoadPrimaryAssetClassList@@CAPEAVUClass@@XZ) referenced in function “class UAsyncActionLoadPrimaryAssetClassList * __cdecl NewObject<class UAsyncActionLoadPrimaryAssetClassList>(class UObject *)” (??$NewObject@VUAsyncActionLoadPrimaryAssetClassList@@@@YAPEAVUAsyncActionLoadPrimaryAssetClassList@@PEAVUObject@@@Z)
1>MechGameInstance.cpp.obj : error LNK2019: unresolved external symbol “private: static class UClass * __cdecl UAsyncActionChangePrimaryAssetBundles::GetPrivateStaticClass(void)” (?GetPrivateStaticClass@UAsyncActionChangePrimaryAssetBundles@@CAPEAVUClass@@XZ) referenced in function “class UAsyncActionChangePrimaryAssetBundles * __cdecl NewObject<class UAsyncActionChangePrimaryAssetBundles>(class UObject *)” (??$NewObject@VUAsyncActionChangePrimaryAssetBundles@@@@YAPEAVUAsyncActionChangePrimaryAssetBundles@@PEAVUObject@@@Z)
1>D:\UNREAL PROJECTS\MechGame\Binaries\Win64\UE4Editor-MechGame-0019.dll : fatal error LNK1120: 5 unresolved externals