Chunk Downloader: not mounting *.pak files in Persistent Download Dir

Hey,
I am working with the Chunk Downloader. I got everything working, manifest file and .pak files are downloaded from the server.

Let’s say the .pak contains the model I need to be loaded in the scene. It is located in .pak chunk 3.
Pak file is downloaded successfully in:
C:\Users\USER_NAME\AppData\Local\PRODUCT_NAME\Saved\PersistentDownloadDir\PakCache

My logic is that this .pak file should not exist in built version of the game, as it should be downloaded from the web, hence the downloadable content. So after I build the test version of the product I delete equivalent .pak file in build folder:
PRODUCT_NAME\Content\Paks\chunk3.pak

At this point everything still works. However, when I want to spawn that model, it fails to find the .pak file, as the build version expects that .pak file to be in the local Paks directory and not in the Persistent Download Dir. If I copy the file via code or manually to local the directory from the download folder everything will work again, but then I have a duplicated file. If I delete downloaded file, it will be downloaded again on the next launch. In any case, I read that the .pak files should live in Persistent Download Dir, for cross-platform support, so I shouldn’t copy.

My question is, how do I point built project to load .pak files from the ones that Chunk Downloader downloaded in Persistent Download Dir folder and not from the local folder?

Thank you.

I tried to do the workaround:

  • I first check if the .pak exists in the PersistentDownloadDir
  • If it does I move it to local Pak folder of the project (as it loads if it is there)
  • Then I do the rest of Chunk Downloader logic, as mounting .pak files.
    (I think it mounts according to the id not actual path to .pak)

This does not work, because after I move the .pak file, file is not registered immediately. No error or anything like that. I think the problem is that .pak files that are held in local Paks folder are meant to be mounted on the start of Unreal application. When I do the manual mounting of the .pak file, I think it mounts from the PersistentDownloadDir - but this doesn’t work.

I want to load a level from external .pak file. For some reason, the only way it will work, if the .pak file exists in local Paks directory, before application is launched.

Finally this is solved!
I think the assumption that .pak files that are in local Paks folder are only mounted on application launch, and that they have to be there pre-launch is correct. However, this is unnecessary as .paks are mounted just fine from the Persistent Download Dir:
C:\Users%userprofile%\AppData\Local\PRODUCT_NAME\Saved\PersistentDownloadDir\PakCache

However, that was not my problem. I was trying to mount for-loop indexes, and not chunk id’s …

To anyone else experiencing problems:
1 Follow Official documentation
2 Put manifest file and chunks that needs to be downloaded on the server
3 In your development root PRODUCT_NAME/Config/DefaultGame.ini change the line (if you followed the documentation) from your ip to the link where your manifest is on server.
[/Script/Plugins.ChunkDownloader PRODUCT_NAME]
+CdnBaseUrls=http:/SomeServerAddress.com/

Hi Can i have followed the documentation provided by unreal but im not able to download the files . The bool which we set to true after patch started always remains false .
So it says that the patching manifest file is not upto date . I have Created own local node js server where i have uploaded the pak files and manifest file

And how can we load the assest or pak files from persistent path and mount it in the game

Hello. I have a similar problem. My project absolutely ignores files in \Saved\PersistentDownloadDir\PakCache
He does not want to read them, but correctly downloads them from the server to this directory.

Hi I am just wondering if you have solved this problem ? I am facing same issue, the .pak is downloaded to Persistent Download Dir and mounts it. But does not load pak it as it is expecting the pak to be in local content folder. Any help would be appreciated.