How to update my game made with Unity running on Android?

user3171615 picture user3171615 · Jan 8, 2014 · Viewed 7.8k times · Source

My game have 100M asset bundles, I put the budle files into the StreamingAssets folder(I want to release my apk as one whole app, not the downloading when playing style), then I built my project into one apk file, then I installed the apk file to my device.

But how can I update my bundles when my game find one new update is available? The StreamingAssets folder on Android is read-only.

One solution is that: copy the bundles in the StreamingAssets folder to somewhere like the Android's External Storage, then use bundles in the External Storage. But this will increase my game size from 100M bundles to 200M.

So on Android when I install one apk, can I install some files meanwhile into somewhere writable?

Anyone can help me? Thanks.

Answer

Roberto picture Roberto · Jan 8, 2014

Not sure if I understood: you shouldn't use asset bundles if you are not, at some point, going to update them or have new assets to download in-game.

So just use regular prefabs and use the regular Android update process to update the application.

But if you want to have asset updates in-game then you use asset bundles, put them on StreamingAssets and use WWW.LoadFromCacheOrDownload(string url, int version) to load them; when a new version of your asset is available you change the version in that call and it will just download and cache the new version.