- Home /
On Android, how can I update files in the StreamingAssets folder?
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 by GameVortex · Jan 08, 2014 at 09:40 AM
Because the StreamingAssets folder is read only you can not download updates to that folder as you say. A solution could be to just download update bundles to the external storage and on the start of your app check if there has been downloaded any updates. If there is, then load the downloaded bundles from the external storage. If not, then use the bundles in the StreamingAssets folder instead (as a default).
And as a reminder: keep in mind the 50MB filesize limit of Google Plays APK files. Anything over that size needs to be hosted in separate **Expansion Files**.
Thanks for your reply, GameVortex.
Your solution is good. If use your solution, the key problem is that I can not release the old bundles, which will not be used any more, in the Strea$$anonymous$$gAssets folder. That is also why I post my question.
And we aim to publish our game on one third-part app store, which doesn't limit the apk size, not the Google Plays. So our apk is 100+$$anonymous$$ with about 100$$anonymous$$ budles in the Strea$$anonymous$$gAssets folder.
I am new to Android, I am wondering if one third-part app store on Android is legal?
Well the files in the Strea$$anonymous$$gAssets folder will be compressed into the .apk file, so it is not possible to delete anything from it. So either you include it and hope that the users won't $$anonymous$$d an extra 100$$anonymous$$B being used when updating the app, or you do not include it and hope that the users don't $$anonymous$$d downloading more bundles right after starting the app.
You can not use me as definitive legal advice, but I do believe third party app stores are legal, just like the **amazon app store**.
O$$anonymous$$, I get it.
This is my first post in Unity. Thank you GameVortex.
Your answer
Follow this Question
Related Questions
Download video and put it into StreamingAssets folder 0 Answers
Mobile Terrain in AssetBundles on IOS and Android 1 Answer
Streaming assets android 0 Answers
Sqlite4Unity3d difficulties 1 Answer