- Home /
Reduce executable size
Hi and thanks for your time.
I am using Unity Iphone Basic and do not have build stripping.
this shows that my executable is 15.4 megs. My understanding is that the exe should be around 10 if you build for arm6 only.
In Unity my build settings are:
Targ device: Iphone only -- Targ plat: arm6(openGl...) -- Api compatability level: Net 2.0 subset -- Target ios: 3.1.2 -- Script Call optimization: Fast
In Xcode:
Release | Unity Iphone | IOS 4.2
Editing the Active Target:
Architectures: armv6, -- Base SDK: ios 4.2, -- Build Active Architecture Only Checked, -- Valid Architectures: armv6
The really odd thing is that if I set the Unity Target Device to: Universal arm6+arm7, Xcode builds the executable exactly the same size as when it's set to armt6 only.
Checking the editor log after a Unity build shows:
Textures 3.6 mb 16.4% -- Meshes 0.5 kb 0.0% -- Animations 0.0 kb 0.0% -- Sounds 3.4 mb 15.6% -- Shaders 2.3 kb 0.0% -- Other Assets 27.7 kb 0.1% -- Levels 9.4 mb 42.6% -- Scripts 464.0 kb 2.1% -- Included DLLs 3.8 mb 17.3% -- File headers 1.3 mb 5.7% -- Complete size 21.9 mb 100.0%
It feels like I'm missing something small but I've run out of ideas. Please help!
--Goody!
Tell you what. To sweeten the pot... If someone can help me get my exe down to a manageable size without having to buy Pro I'll give you a code to my soon to be submitted app when it releases!
"Can I go below 20 mega bytes with Unity iOS? Yes, empty project would take ~13 $$anonymous$$B in the AppStore if all the size optimizations are turned off. You still have 7$$anonymous$$B budged for compressed assets for your game. If you own an Advanced License (required for the stripping option) you are in much better shape. In this case an empty scene with just the main camera will take up about 6 $$anonymous$$B in the AppStore (zipped and DR$$anonymous$$ attached) and you will have ~14 $$anonymous$$B budged for compressed assets." http://unity3d.com/support/documentation/$$anonymous$$anual/iphone-playerSizeOptimization.html
It looks like it'll be hard to make your final built even smaller then it already is, if I understand the page I linked to correctly. I have little experience with this though, so I hope for I'm wrong :)
Also, set script call optimization to: Fast but no exceptions
Well, there's nothing else you can do. It will be smaller once you compress it.
Answer by Goody! · May 28, 2011 at 11:38 PM
There was no answer other than to pony up the $2600us. Suxs.
Oh, nice, lost the points I offered for the answer as well.
Btw, after byte code stripping I got back around 13 megs. That's-a-lot! Free Unity can make a game but in my experience there isn't room for more than about 4 megs of your own assets.
So your original exe was 15.4 megs and you say you saved 13 megs, is that 13 megs from the EXE? Our EXE is HUGE and I am slightly concerned it will be considered too big but I can't find any EXE limits on apple's developer pages so far.
I gave you +1 for ponying up the cash. We iOS devs do have a high price to pay for a pro feature - I am guessing I'll be ponying up the readies when we get close to completion (circa 2013 at the current rate!).
Your answer
![](https://koobas.hobune.stream/wayback/20220613134103im_/https://answers.unity.com/themes/thub/images/avi.jpg)