Posts Tagged ‘technology’

You say you’re a smart dev using Unity3D Pro and you’re trying to make it to the under-50 megabyte OTA cap on iOS and ya just need a little more weight reduction?  Here’s a quick tip: use small, uncompressed png files for your unused splash images.

splashesNotice that since this App is portrait-mode only, there are three potential unused splash screen images. Well, if you look at your Xcode project or an archived build you’ll see that there are some PNG files there for these unused orientations. They’re just the Unity3D logo, but there are several – for normal and retina resolutions.

  • Default-Portrait.png is 59 Kb, Default-Portrait@2x.png is 195 Kb, Default.png is 65 Kb, Default@2x.png is 204 Kb, and so on. If you’re not using them why waste the space? Just add a very small (say 64×64) black texture to your assets folder and use that instead of leaving the Unity inspector setting as “none”.

For example, “Default-Landscape@2x.png” (corresponding to “High Res iPad Landscape” in the image shown here)  is a 64×64 black texture and is just 9 Kb.  Now of course Apple uses its wierd PNG compression and will reduce these file sizes a bit more but you will still save space – try archiving before and after and you’ll always save something.

Why waste the space – save bytes, and take comfort in the fact that when you sell 10 million copies of your masterpiece the energy save by not transmitting these spurious bytes you’ll save people money on their data plans and save enough energy to light a 20 W LED bulb for 29 seconds!

Notes: You need Unity Pro to change the splash screen images in the first place. If you use a compressed texture you’ll get a warning every time you build.