Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Load asset from .pak file,but synchronousLoad failed attempt to load

Load asset from .pak file,mount success,but synchronousLoad failed attempt to load,Does anyone know how to solve this problem? Thank you very much. code:

 FString MountPoint(FPaths::EngineContentDir()); 
     if (PakPlatformFile->Mount(*SaveContentDir, 0, *MountPoint))
         UE_LOG(YourLog, Warning, TEXT("Mount Success"));
         TArray<FString> AssetsToLoad;
         TArray<FString> FileList;
     PakFile.FindFilesAtPath(FileList, *PakFile.GetMountPoint(), true, false, true);
     FStreamableManager* StreamableManager = new FStreamableManager();
         FString AssetName = FileList[10];
         FString AssetShortName = FPackageName::GetShortName(AssetName);
         FString LeftStr;
         FString RightStr;
         AssetShortName.Split(TEXT("."), &LeftStr, &RightStr);
         AssetName = TEXT("/Engine/") + LeftStr + TEXT(".") + LeftStr;
         FStringAssetReference reference = AssetName;
         UObject* LoadObject = StreamableManager->SynchronousLoad(reference);
         if (LoadObject != nullptr)
             UE_LOG(YourLog, Warning, TEXT("Object Load Success..."))
             UE_LOG(YourLog, Warning, TEXT("Can not Load asset..."))

error message:

 LogTemp: Warning:  ----------- LoadPak: ../../../../../Unreal Projects/codetest03/Content/newout.pak --------------
 YourLog: Warning:   not load pak ../../../../../Unreal Projects/codetest03/Content/newout.pak
 YourLog: Warning: Mount Success
 YourLog: Warning:   Pak ALL Path ../../../Engine/Content/
 YourLog: Warning:  Pathname... /Engine/003.uasset
 LogStreamableManager: Failed attempt to load /Engine/003.uasset
 YourLog: Warning: Can not Load asset...

Product Version: UE 4.18
more ▼

asked Sep 18 '18 at 09:43 AM in C++ Programming

avatar image

1 1

avatar image StrangerGwenn Nov 13 '18 at 04:20 AM

Hi, did you ever solve the issue ?

avatar image GiapTT May 16 '19 at 02:19 AM

try this AssetName = "/Game/path_to_asset/asset_name.asset_name"

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I use unreal 4.19.

Make sure *.uasset is cooked ( a.uasset + a.uexp).

Cook file https://docs.unrealengine.com/en-us/Engine/Deployment/Cooking you can find cooked asset in [Project]\Saved\Cooked dir.

more ▼

answered Nov 23 '18 at 09:06 AM

avatar image

21 2 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question