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

Question Build size too big

Discussion in 'Addressables' started by raiden_nguyen, Oct 23, 2020.

  1. raiden_nguyen

    raiden_nguyen

    Joined:
    Jul 21, 2016
    Posts:
    7
    Hi,

    After fixing all duplicates using Analyze tool, the apk file still bigger than before i start using Addressable.

    All my bundle is local and use LZ4 compression.

    Here what i have done:
    + Fix all duplicates found in "Check Duplicate Bundle Dependencies" by moving duplicate assets to appropriate groups.
    + Fix all duplicates found in "Check Scene to Addressable Duplicate Dependencies".
    + Fix all "Implicit" found in "Bundle Group Preview".

    I use this Build Report Tool and see that non-addressable assets, scripts, dll is about 32MB and aa folder is around 110MB (i have nothing else in StreamingAssets folder) => the apk size should be around 140 - 150 MB but the apk size is 40MB bigger (188MB) :eek:

    I suspect there're problem with compression. But have no idea how to fix this.
    I extracted the apk and the total size is around 300MB. The non-addressable apk (~150MB)'s extracted size is ~500MB.

    Any help is appreciated.
     
    Last edited: Oct 23, 2020
  2. Lucas-Hehir

    Lucas-Hehir

    Joined:
    Jul 2, 2014
    Posts:
    41
    Are any of your scenes addressable? Assets in an addressable scene get automatically duplicated if they're present in two different scenes from two different asset groups.
     
    raiden_nguyen likes this.
  3. raiden_nguyen

    raiden_nguyen

    Joined:
    Jul 21, 2016
    Posts:
    7
    All my scenes is addressable (exclude 1 scene with no ui to load addressable scene on startup).
     
  4. Lucas-Hehir

    Lucas-Hehir

    Joined:
    Jul 2, 2014
    Posts:
    41
    That might be it then (It might not be too though...) Any assets in use in those scenes will be duplicated if they're not already part of another unique group themselves. For example...

    Lets say you have the following in your project:
    • AssetGroup A
      • Scene A
    • AssetGroup B
      • Scene B
    • AssetGroup C

    Any assets used in scene A or B that don't already belong to group C (or some other) will be duplicated when you build your content. Copies of the asset will be created and included in A or B automatically. If this is happening in your project (you can use an AssetBundle inspector to see if it is) then all you need to do is put the assets being duplicated into another seperate asset group like C.

    I hope that helps somewhat. It might be a different problem like compression...
     
    raiden_nguyen likes this.