Fixing ChunkDownloader Plugin

Hello everyone

I have been trying to implement [ChunkDownloader Plugin] but I faced some issues on update contents

Here is what happened
After setup everything up in the correct way as mentioned in the document and making a new update to the Manifest file on server nothing happened
what I mean CachedBuildManifest is not caching the new Manifest update and that happened with MICHAEL when he was on ChunkDownloader Explained | Inside Unreal, so he manages that issue by deleting Saved files every time making an update which makes the plugin useless, I can’t ask my clients to delete the Saved file to get my new update !!

So here is what you have to do to avoid this issue
ChunkDownloader depends on two things for making an update
1- ContentBuildId
2- Manifest .pak Version [inside Manifest file after pak size ]
these are the only two things you should care about

If you don’t update ContentBuildId inside “PatchingDemoGameInstance”

const FString ContentBuildId = "BuildID";

The plugin will never connect to the server because she cached the file ContentBuildId locally

So if you want to make an update you should change ContentBuildId to something on your server side and I think to manage that you may need an API connection to edit this Value from the server to the new ContentBuildId

For the manifest, for each update, you make be aware to change the .pak version unless you got an engine crash

so here an example :

add this to your header file for Gameinstance

UPROPERTY(EditAnywhere, BlueprintReadWrite);
	FString CurrentContentBuildId = "NEW_Version";

and make on cpp file this change on Init Function

const FString ContentBuildId = CurrentContentBuildId;

there is another issue here if you need to call ContentBuildId from API server because Init() function is a constructor
you need to add a new function to handle what Init() function has and call it when you need to check for updates after calling the API’s

Hope this helps
and I may make a tutorial on youtube soon for this if people interested

2 Likes

amazing work dude

Through this method CachedBuildManifest.txt is successfully created and updated.

But the LocalManifest.txt is not recreated, resulting in the file bytes of the two are not synchronized.

How do you solve the problem of LocalManifest.txt update?

Or PAK did not pull the latest version into the folder,
I made sure that the PAK information in the server is up to date.

You can’t update LocalManifest.txt
the only thing you can play around with is updating ContentBuildId
which you going to add a new folder have another name on your server
image

keep in your mind to change the version on Manifest also it looks like this

and inside your cpp file for Gameinstance you should change
ContentBuildId

this will force the Chunkdownloder to do your update to change CachedBuildManifest.txt
the LocalManifest.txt just to make sure the file is there and has the same size on CachedBuildManifest

Yes, thanks, you are right.

I did not modify the version number of Ver, I thought that the version has been switched after modifying the ContentBuildID.

Now when I change “Ver” to “Ver2” everything works fine.

image

in addition, I have to delete the code of the other two platforms.
It seems that the failure to read the manifest files of other platforms will also cause crashes, have you researched how to deal with different platforms?

1 Like

It seems that the Android system can also use this Windows code, and it works normally. :sweat_smile:

I think the double quote where platforms “Windows”, “IOS”, “Android”
Just for organizing, it does not have any impact