Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

iOS build size increase after upgrade to 4.5

Discussion in 'iOS and tvOS' started by vaclav_b, Aug 8, 2014.

  1. vaclav_b

    vaclav_b

    Joined:
    Jun 7, 2013
    Posts:
    16
    So it took us a while, but we finally moved our core project to Unity 4.

    Everything works great except that today we noticed that the build size of the project increased about 14 MB (the estimated size of the app after archiving).

    What I did is take the the backup of the project that's still in 3.5, opened it in 4.5.0 (or 4.5.2, checked both versions) without any changes (code, assets, everything is the same).

    I checked the editor log, and other than around 600KB size difference in shaders, everything else is the exact same size. So my guess is it has to be unity.


    Was there anything that changed between those version that could cause it? Is there anything we could avoid doing or change that would solve the issue? Or is this just something we have to accept as cost of moving to higher version?

    Sorry if this was answered elsewhere, but I googled far and wide and couldn't find anything.
     
  2. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,571
    I have answered it recently, but it doesn't show up in searches. Unity adds features, they increase the build size. Apparently there are some changes on the way with Unity 5, but they might be Pro-only, and might come later in the cycle.
     
  3. vaclav_b

    vaclav_b

    Joined:
    Jun 7, 2013
    Posts:
    16
    I understand that, but it would be nice to have a list of things like that will increase in size so you can prepare for this.

    For example if textures will take x% more memory from now on they should let us know. I assume Unity devs know what exactly is increasing the size of the build, they could share that knowledge with us.
     
  4. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,571
    It is not the assets taking more size, it is the game engine. Developers have no control over that.
     
  5. mkg2w

    mkg2w

    Joined:
    Aug 19, 2013
    Posts:
    49
    We have a similar issue, but it's from version 4.3.4 to 4.5. The same code increased by 8MB when we generate a "estimate on AppStore", when built with 4.5.

    It seems odd that there is such a jump, so I'm wondering if anything else may be the cause?
     
  6. Smilediver

    Smilediver

    Joined:
    May 5, 2011
    Posts:
    72
    There was a similar thread awhile back: http://forum.unity3d.com/threads/ipa-bigger-in-unity4-5.255642/ , and it seems it's a problem with ipa compression. It could be that something changed in Unity's serialisation that makes data less compressible. You can try to get, extract and compare contents of actual ipa files (they're renamed zip archives) and see if there's actual increase in the original data, or if it's just less compressible. If it's less compressible, then you can try to see stats in the archives and see what files are less compressible. Though, it's a bit problematic, since unity packs all the assets into one file.
     
  7. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    Are you using unity 2d sprites and/or sprite packer?