Our app is just large enough that Unity is splitting out streaming assets folder to UnityStreamingAssetsPack - due to the Unity localization plugin.
It’s taken me months to get a consistent split AAB build working that will upload to Google Play (GP) console and be available for testers.
However, because this is a Unity generated asset bundle, setup as a Fast-Follow. I have no control over its creation or downloading from GP servers.
What we have found through testing is that…
we get intermittent internal failures trying to download from google servers.
sometimes get a timeout when checking to see if the if the UnityStreamingAssetsPack has been downloaded * currently set at 90 seconds for 225mb
I load a splash screen, look at the status of the download
string[ ] assetPackNames = { “UnityStreamingAssetsPack” };
if (!AndroidAssetPacks.coreUnityAssetPacksDownloaded)
{
yield return StartCoroutine(WaitForAssetPacksDownload(assetPackNames));
}
else
{
// UnityStreamingAssetsPack was downloaded…do any initialization or checks here
}
Inside of “WaitForAssetPacksDownload” the download works and the app continues loading
If the download fails for any reason i cannot continue to load the app beyond the splash screen.
Google flagged our release because of our attempt to trap these problems and display some meaningful error to the user on how they might continue.
What the heck can I do the WILL pass Google Play review of my app when/if UnityStreamingAssetsPack cannot download?
Unfortunately this is Google Play problem with fast-follow asset packs. You can’t really be sure that they are downloaded automatically and we from Unity side can’t do anything about it. I suggest you to use AndroidAssetPacks.DownloadAssetPackAsync method to force re-download Unity generated fast-follow asset pack, if it fails to download automatically.
But, this doesn’t resolve my issue. When/if AndroidAssetPacks.DownloadAssetPackAsync fails how do I comply with not showing an error to the user and not just magically closing the app?
According to Google internal error means “Unknown error downloading an asset pack.”
I really doubt that we can do anything about it from our side, but just in case few more questions:
is this reproducible when installing app from Google Play only? (if you install aab locally, you need to remove previous installation manually, fast-follow and on-demand asset packs don’t support update)
how often does this happen (percentage)?
is there any dependency on device / Android version?
if after download fails, you try to download the same pack again - are you getting the same error?
You are correct, in that its an issue on their end.
What would be nice to have is some kind of “Best Practices” on how you could deal with the application response to the end user that will pass Google Play review process of not showing errors, or having crashing app because a file couldn’t load.
Right now I’m only able to guess at a workflow and notification that meets their requirements.
Please let know if manual download helps to solve the problem.
As for the “Best Practices” to handle asset pack downloading related problems - I believe it’s best to ask Google. These problems can’t be Unity specific.
Manually downloading might resolve the issue. For “Best Practices” in handling asset pack downloading problems, consulting Google is wise since these challenges extend beyond Unity and apply broadly across platforms.