Search Unity

Local Addressables built into the app has Large APK Size

Discussion in 'Addressables' started by Ben-BearFish, Feb 19, 2020.

  1. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    After doing a build with Addressables our APK size is twice the size. I was under the impression that Addressables were suppose to make build sizes smaller. Is this incorrect?
     
  2. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    Did you already run the analyse tool and use "fix selected" to have it automatically create the "duplicate assets" group(s)?
    The only reason size grows is that you might be packing the same asset in multiple bundles. (or you are saving it uncompressed and previously compressed?)
     
  3. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    @MikeHergaarden I ran the Fix Selected for duplicates and the size is still larger. I'm perplexed by the situation.
     
  4. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    586
    Are your assets also included in the build? Any direct references inside built scenes will be included in the build.
     
    RecursiveFrog likes this.
  5. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Think that might be it. We have one scene with a bunch of UI that is probably pulling the UI/SpriteAtalses in twice. It'd be nice if Unity could detect that and prevent the duplicates. I guess until then, I can mark the scene as addressable.
     
  6. arielsan

    arielsan

    Joined:
    Dec 3, 2013
    Posts:
    47
    It is happening for us too, but if we clean all the addressable stuff and rebuild from 0, it works ok. It seems that there is something cached in Library or in addressables that ends up with a double sized build.

    Well not sure, we kept testing and it seems it is the other way, a clean build in our buildserver creates a double sized build, but if we build again without cleaning, the second time it has the right size. Probably an issue with how we run the build addresables from 0 from a buildscript.... I will try to reproduce the case in a separated project if I have time later.
     
    Last edited: Aug 21, 2020