Hi guys, I’m using the “Mobile Patching System” feature introduced in 4.14 for an android project, to create a small starting map (for the AppStore) that would then download the rest of the game from the cloud. Everything goes well but I’m having a problem at the Mount stage.
These are the steps I’m following:
- Create a new Blueprint blank project.
- Create an entirely blank map called “Lobby” with only the Mobile Patch Utility Nodes in the level blueprint (Mobile Patch Utility Nodes | Unreal Engine Documentation). All the nodes look pretty much the same as that guide.
- Create another map called “Main” which consists of a floor and a couple of cubes lying around. This is the level that would be downloaded from the cloud.
- Follow the Mobile Packaging Wizard (Mobile Packaging Wizard | Unreal Engine Documentation). Create the two profiles, choose “Lobby” as the Distributable APK map and build in Development configuration, choose “Main” as the Downloadable map and select Android_ETC1 texture format.
- After running the profiles, a few things were generated:
a. In the game directory, “Android_APK_DLC” folder (as specified in Mobile Packaging Wizard step 3). It contains two folders: App->1.0->EMPTY and HTTPchunks->DLC1.0->…Android_ETC1->DLC1.0->MobileDLC->MobileDLC-Android_ETC1.pak, …Android_ETC1->ManifestDir->EMPTY.
b. In the game directory, “Releases” folder. Releases->1.0->Android_ETC1->MobileDLC-Android_ETC1.pak and AssetRegistry.bin.
c. In the PC’s Documents directory, “Unreal” folder. Contains Android_ETC1 folder with the apk, ChunksV3 folder and the manifest file (MobileDLC_MobileDLCDLC1.0.manifest).
- Rename the manifest file to “mobileTEST.manifest” and upload this and the ChunksV3 folder to the server.
- Install the apk generated in the Documents/Unreal/Android_ETC1 folder in the mobile device.
- Run the game in mobile. The request, download and installation processes were all successful, but the mount process fails with a “Mount failed” error.
I created another C++ project to debug the Mount function and see what went wrong.
The FindPlatformFile(TEXT(“PakFile”)) function is returning null, so then (PakFileMgr == nullptr) is true, the function returns false and the process fails.
Any idea how to solve this problem? Or if I’m doing something wrong?
I apologize for the delay. I’ve reached out to our developers for more information on this to see if they have any suggestions for you, and I will respond as soon as I have more information.
Thank you for your patience.
Thanks, Sean. I appreciate that.
Look forward to hearing back from you soon.
Just an update that the engineer responsible for this is out of the office for a few days. I’ll respond as soon as I hear back from them.
Ok thanks, Sean. Hopefully they can follow up on this asap
This is strange that App->1.0 is empty. Android_APK_DLC folder should have App folder where final apk will be placed after packaging process. And Android_APK_DLC/HTTPChunks/…/… should have CloudDir that needs to be uploaded to server. Do you have any packaging errors in the log?
I am marking this topic as resolved for tracking purposes, as we have not heard from you in a few days. If this issue persists, feel free to respond to this thread. For any new issues, please create a new Answerhub topic.
Have a great day
Sorry for the delay, please don’t close this issue.
As a matter of fact I do have packaging errors, but I kept trying because some files were being created. See the screenshot below and I’m also attaching the full log. That’s what happens when I launch the APK Profile.
Could you delete content of HTTPChunks/ and App/ directories and then run both profiles again, first app profile then DLC profile? Do not rename or move any files.
Also could you check if your setup works on PC? Just open created profiles and change settings there to package for Windows instead of Android.
I deleted the content of HTTPChunks/ and App/ directories and then ran both profiles again, but I get the same results, empty folders and that same error in “UAT post launch cleanup”.
I also tried changing the settings to package for Windows and again, same results. It creates the same files as in Android and every process finishes successfully except the “UAT post launch cleanup” in the app profile.
Looks like it complains about Projects/MobileDLC/APK_DLC/App/1.0 which is part of C:\Users\Documents\Unreal Projects\
Could you move your project to a place where there no spaces in the path, and try again? Looks like last packaging step does not handle spaces in the path correctly. If moving project helps, we will fix it in next release.
Yes, thanks! Indeed that was the problem!! I moved the project to the desktop (no spaces in the path) and the packaging finished without any errors. Be sure to fix that in the next release.
Now all the folders and files from the Mobile Packaging Wizard are there. I upload the files to the cloud, the download, installation and mount functions work ok, but now I’m having another problem.
All the patching logic is made on the level BP of the Lobby level. Once the Main level has been successfully downloaded and mounted, I load it calling “Open Level”. It does load the level but most meshes are missing, see the screenshots below:
Main level - as seen in the Editor
Main level - screenshot taken from an android device
As you can see, the shadows of the cubes are there but the cubes themselves are not. Also, note that the floor is there but it probably has to do with the fact that it’s the same floor that the Lobby level has.
Here’s the project I’m using:
(Be aware that the Mobile Packaging Wizard will throw a packaging error which I solved by adding an empty c++ class to the project).
A couple of things I tried but didn’t work:
- Adding a 5-second delay before opening the Main level
- On the Mount function, changing the Pak Order to 0
Hi, sorry was OOO for a week. Where those cube assets located? What if you move cube asset into /Game/Content/ folder and then package project? I suspect missing cubes are form Engine content which is not included into DLC.
That was it! I copied the cube assets to the /Game/Content/ folder and it worked! Thanks so much.
This issue is resolved, but I do have one more question. I’d appreciate it if you could advise whether this solution or something similar could be used for PC patching. Any examples, documentation of just pointing me in the right direction would be great! Thanks
This will work the same way on PC, its called mobile patching because in most cases its used to reduce initial app download size which is important on mobile platforms. But this can be used on PC as well.
Excellent! Thanks for your help.