- Home /
Why is my build file size so big?
I am using Unity 3.5.6f4 and building to Android. The final apk size is 66.5 MB, yet in the editor log, it is showing a complete size of only 30.8 MB:
Textures 22.2 mb 72.2%
Meshes 280.8 kb 0.9%
Animations 0.0 kb 0.0%
Sounds 1.7 mb 5.5%
Shaders 89.7 kb 0.3%
Other Assets 1.9 mb 6.1%
Levels 294.7 kb 0.9%
Scripts 205.6 kb 0.7%
Included DLLs 3.8 mb 12.3%
File headers 317.0 kb 1.0%
Complete size 30.8 mb 100.0%
What could be causing the file size to be more than twice the size it says in the editor log?
For comparison, my last project had a complete size of 325 MB, yet the apk was only 24.MB. Why the huge discrepancy?
Thanks for your help!
I am experiencing the same thing for iOS. $$anonymous$$y question was left unanswered.
On iOS your .ipa size of AppStore takes into consideration the uncompressed size of your .app (the executable) which has DR$$anonymous$$ applied before compression, basically rendering it uncompressable. $$anonymous$$ine for instance is 37mb - thanks mostly to Unity and Scaleform.
Answer by whydoidoit · Jun 18, 2013 at 07:35 PM
Well Unity itself takes a decent amount of space - depends on whether you have Pro and Bytecode stripping turned on etc - if not then the cost of the .NET libraries you use plus any native plugins will be added to that size in their entirety, otherwise some code will be removed. In addition there will be the size of your splash screens etc and all of your streaming assets.
And actually it's pretty easy to see what's taking all the space, rename the .apk to .zip and unzip it!
On iOS rename the .ipa to .zip and unzip it. Then do Show Package Contents on the resulting expanded archive file.
Thanks, I figured out my problem based on this. I had several music tracks that were set to stream from disk that weren't included in the total size. Once I compressed those, my apk went from 66.5 $$anonymous$$B to 23 $$anonymous$$B.
That's good for other reasons - those things kill memory on the phone where they appear to not actually really stream from anything! I found that out recently myself when running out of RA$$anonymous$$.
So you are saying not stream from disk? I also have some music tracks set to stream...
Your answer
Follow this Question
Related Questions
Unity APK crash on Xiaomi Poco 0 Answers
Failed to re-package resources. 16 Answers
Empty Android Build contains more dlls. 0 Answers