x

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"

Mounting .pak file screws up asset loading in Windows

Hello, I have strange behavior on 4.17

I made some .pak files using UnrealPak and mounted it in runtime. It compiled and worked as expected in Android. But in windows, engine cannot find most of assets after mounting pak even asset file was not inside in the pak file.

I used code like this:

 void UMyGameInstance::Init()
 {
     Super::Init();
 
     auto PakPlatformFile = static_cast<FPakPlatformFile*>(FPlatformFileManager::Get().FindPlatformFile(TEXT("PakFile")));
     if (PakPlatformFile == nullptr)
     {
         PakPlatformFile = static_cast<FPakPlatformFile*>(FPlatformFileManager::Get().GetPlatformFile(TEXT("PakFile")));
         if (PakPlatformFile->Initialize(&FPlatformFileManager::Get().GetPlatformFile(), TEXT("")))
         {
             UE_LOG(LogTemp, Log, TEXT("created new FPakPlatformFile"));
             FPlatformFileManager::Get().SetPlatformFile(*PakPlatformFile);
         }
         else
         {
             UE_LOG(LogTemp, Error, TEXT("cannot initialize patch file!"));
         }
     }
 
     check(PakPlatformFile);
 
     FString path = FPaths::GameSavedDir() / TEXT("Characters.pak");
     bool ret = PakPlatformFile->Mount(*path, 200);
     check(ret);
 }


As a note, just resetting platform file is not cause the problem. When after pak file mounted explicitly, the problem arises.

And I tried replacing PakPlatformFile->Mount() to FCoreDelegates::OnMountPak.Execute(), but no luck. Is it a bug? Or I might done a mistake?

Product Version: UE 4.17
Tags:
more ▼

asked Sep 01 '17 at 06:49 AM in Bug Reports

avatar image

nullbus
6 1 3 7

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

https://github.com/EpicGames/UnrealEngine/pull/3548

I noticed there is some fixing is on going. Looking forward to the issue being solved :(

more ▼

answered Sep 04 '17 at 02:49 AM

avatar image

nullbus
6 1 3 7

(comments are locked)
10|2000 characters needed characters left
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