Unity iPhone Build gaining 20MB in Xcode

Hi Everyone,

just having a problem getting down to my project down to the 20MB download limit. The editor log says:

  • Textures 18.8 mb 71.2%
  • Meshes 162.2 kb 0.6%
  • Animations 0.0 kb 0.0%
  • Sounds 1.5 mb 5.8%
  • Shaders 0.0 kb 0.0%
  • Other Assets 49.0 kb 0.2%
  • Levels 91.1 kb 0.3%
  • Scripts 144.7 kb 0.5%
  • Included DLLs 5.6 mb 21.3%
  • File headers 40.4 kb 0.1%

Complete size 26.4 mb 100.0%

I'm going to reduce the textures and thing but I was wondering if anyone knows how to reduce the included dlls I'm sure I'm not using them all. Also when I build it in XCode the app size goes to 43.7MB does anyone know why this happens.

Thanks

Chris

Making a <20MB iPhone project with Unity is next to impossible I think unless you have something really really simple. Especially if you already on 18MB Textures! So, forget the 20MB and focus on getting your game really really good :-)

I'm assuming you are using Unity 3.0. Simple checklist how to make your distribution as small as possible

  • Minimize your assets: make all textures PVRTC compressed and reduce texture resolution if possible; minimize uncompressed sounds.

  • Set iOS Stripping Level to Use micro mscorlib.

  • Set script call optimization to Fast but no exceptions.

  • Don't use anything that lives in System.dll or System.Xml.dll in your code. Those two are not compatible with micro mscorlib.

  • Remove unnecessary code dependencies

  • Remove unnecessary assets

  • Use .Net 2.0 subset as Api Compatibility Level Note: .Net 2.0 subset has limited compatibility with other libraries.

  • Set Target Platform to armv6 (OpenGL ES1.1).

To eliminate the included DLLs, don't use features that add them. For example, using System.Text.RegularExpressions adds about 1MB. (No, unfortunately there's no simple way I know of to know what adds DLLs and what doesn't.) The Unity engine adds some MBs, especially if you're building for both ARM6 and 7; then the whole engine is basically added twice.