Chunk Downloader Changed in UE5

I attempted to follow the Chunk Downloader example for UE5 but after packaging I can see there are new file types that are created in the Pak folder – these include the original .pak (although very small files) and .utoc and .ucas files. With these new file extensions and different file sizes how does one setup the build manifest txt file? Does it all still work similarly as before?

I am stuck on this as well. The .paks download but I get an error mounting…

LogChunkDownloader: Chunk 1001 mount requested (1 pak sequence).
LogChunkDownloader: Error: Unable to mount chunk 1001 (no FCoreDelegates::MountPak bound)

Has anyone had any success using Chunk Downloader in Unreal 5?

That happens when “Use Io Store” is enabled in the “Packaging” section of the project settings. Seems like it is something to do with the “Zen Loader” introduced in 4.26. When enabled it will brake the Chunk Downloader since it only supports the .pak file itself. We also can’t use pak signing since the .sig file is generated from it. Our best bet is hope for Epic to expand the Chunk Downloader to work with these other engine features so we may benefit from date temper prevention, faster loading and the Chunk Downloader itself.

2 Likes

Hey @Jon_Star_Atlas, I have the same problem. Did you have any success with it? I struggle with the “LogChunkDownloader: Error: Unable to mount chunk 1001 (no FCoreDelegates::MountPak bound)” since days now. When stepping into the code it comes down to the fact that:

FCoreDelegates::MountPak.BindRaw(this, &FPakPlatformFile::HandleMountPakDelegate);

which is called in:

bool FPakPlatformFile::Initialize(IPlatformFile* Inner, const TCHAR* CmdLine)

never gets called.

Any help is highly appreciated!

Cheers

1 Like

By the way:

is a duplicate! Also no solution there.

Hi, the following patch to ChunkDownloader succeeded MountChunk.
(Thanks to emrahgunduz’s gist)

*** Source/ChunkDownloader.Build.cs.org Tue Apr 26 02:53:41 2022
--- Source/ChunkDownloader.Build.cs     Tue Apr 26 02:38:50 2022
***************
*** 14,20 ****
                                "Core",
                  "ApplicationCore",
                  "CoreUObject",
!                 "HTTP"
                        }
                );
                PrivateIncludePathModuleNames.AddRange(
--- 14,21 ----
                                "Core",
                  "ApplicationCore",
                  "CoreUObject",
!                 "HTTP",
!                 "PakFile"
                        }
                );
                PrivateIncludePathModuleNames.AddRange(


*** Source/Private/ChunkDownloader.cpp.org      Mon Mar  7 22:01:46 2022
--- Source/Private/ChunkDownloader.cpp  Mon Apr 25 21:44:14 2022
***************
*** 15,20 ****
--- 15,21 ----
  #include "Misc/Paths.h"
  #include "UObject/UObjectGlobals.h"
  #include "Misc/ConfigCacheIni.h"
+ #include "IPlatformFilePak.h"
  #include "Download.h"

  #define LOCTEXT_NAMESPACE "ChunkDownloader"
***************
*** 403,408 ****
--- 404,430 ----
        check(!InPlatformName.IsEmpty());
        UE_LOG(LogChunkDownloader, Display, TEXT("Initializing with platform='%s'"), *InPlatformName);

+
+       // from https://gist.github.com/emrahgunduz/c527105e752d705d03dc5a8ac38cebbe --------------
+       bool bSuccessfulInitialization = false;
+       IPlatformFile* LocalPlatformFile = &FPlatformFileManager::Get().GetPlatformFile();
+       if (LocalPlatformFile != nullptr)
+       {
+               IPlatformFile* PakPlatformFile = FPlatformFileManager::Get().GetPlatformFile(TEXT("PakFile"));
+               if (PakPlatformFile != nullptr) bSuccessfulInitialization = true;
+       }
+
+       if (bSuccessfulInitialization)
+       {
+               const TCHAR* cmdLine = TEXT("");
+               FPakPlatformFile* PakPlatform = new FPakPlatformFile();
+               IPlatformFile* InnerPlatform = LocalPlatformFile;
+               PakPlatform->Initialize(InnerPlatform, cmdLine);
+               FPlatformFileManager::Get().SetPlatformFile(*PakPlatform);
+       }
+       // ----------------------------------------------------------------------------------------
+
+
      FPlatformMisc::AddAdditionalRootDirectory(FPaths::Combine(*FPaths::ProjectPersistentDownloadDir(), TEXT("pakcache")));

        // save platform name

Now I’m investigating how to fix root path of mount point:

LogPakFile: Display: Mounted Pak file 'D:/Path/To/TravelDownloadLevel/Saved/PersistentDownloadDir/PakCache/pakchunk2003-Windows.pak', mount point: '../../../DlcPackaging/Content/'
LogPakFile: Display: Mount point: '../../../DlcPackaging/Content/' is not mounted to a valid Root Path yet, assets in this pak file may not be accessible until a corresponding UFS Mount Point is added through FPackageName::RegisterMountPoint.
1 Like

Hey tomataco, did you get any further with this?

I found the solution which I describe here: