I have a question about Assetbundle size on Android. I thought that the assetbundle were always compressed on disk, but that doesn’t seem the case. The data for my app is 200mo and I’m not sure I understand why.
APK size: 42mo
Assetbundle size: 48mo
App installed size: 58mo
Data installed: 156mo (supposed to be 48mo or really near that?)
Anyone have a explanation why the data for my app is 156mo?
Same here.I also asked a this question on group but no one else answers.
When I build on android with data 300mb while assetbundle.unity3d I upload on server only 27 mb.I don’t know why it is too large.
I still looking for way to fixed.Hope you have solution .
Asset bundles are compressed but they must be decompressed before use. If you’re using LoadFromCacheOrDownload, it decompresses the asset bundle into the cache which then shows up as the “data installed”. And since the asset bundle contain not your original PNG/JPEG files but much larger re-coded textures, the result is a lot of space use.
See this post about different ways to load asset bundles: Working Multi-Resolution Sprite Sheets - Unity Engine - Unity Discussions
Also check out this feedback item about supporting PNG/JPEG texture formats and vote for it if space usage is a concern: http://feedback.unity3d.com/suggestions/png-and-jpg-texture-format
I read this post which you send But I still don’t really know how to do.I tried many way but data on android device too big.It dependences asset bundle size which upload on server.
if i have 1 mb asset bundle on server then data on android about 12mb
but if 27mb asset bundle on server then data on android about 200-300mb.
I don’t know how to do.
The point was, there isn’t much you can do. At least, not with asset bundles.
Be sure to vote for that feedback item and hope Unity implements it sometime soon.
Edit: Mentioned in that post was that AssetBundle.CreateFromFile will someday be able to load compressed asset bundles directly into memory. This could be the solution. We’ll have to wait and see what kind of performance it provides. In any case, storing and loading sprites in PNG/JPG format is a standard everywhere and, in my opinion, should be integrated in Unity too.
1 Like
Thanks mdrotar .I saw many games on play stores.They have many graphics and maybe is a big game But apk size normal.When I start game it begin download data and only one time.I also saw info game in app settings .All data and cache is so small.SO I’m wondering how they save resource to download in game.
Your APK size should still be relatively small. It is compressed and android runs your app directly from this compressed file. Using asset bundles, on the other hand, makes it pretty tricky to keep the space usage small.
As for the other games, I’m guess they either use WWW to load the asset bundle (which will be much slower), or they don’t use asset bundles at all.