Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Tooling to diagnose Build Report "Levels" size

Discussion in 'Editor & General Support' started by NWalker_FGOL_Ubisoft, Jan 20, 2021.

  1. NWalker_FGOL_Ubisoft

    NWalker_FGOL_Ubisoft

    Joined:
    Aug 10, 2015
    Posts:
    25
    Context: This android build report is concerning to us because our expectation is that level sizes should only account for a few % of build size:
    Build Report
    Uncompressed usage by category (Percentages based on user generated assets only):
    Textures 42.4 mb 22.0%
    Meshes 1.4 mb 0.7%
    Animations 401.2 kb 0.2%
    Sounds 2.9 mb 1.5%
    Shaders 4.7 mb 2.4%
    Other Assets 1.9 mb 1.0%
    Levels 113.8 mb 59.0%
    Scripts 9.6 mb 5.0%
    Included DLLs 13.4 mb 6.9%
    File headers 2.6 mb 1.3%
    Total User Assets 193.0 mb 100.0%
    Complete build size 549.9 mb


    The actual APK is 141MB.

    I.e. The YAML scene data (including scene meta-data like lightmaps) is only 30MB on disk. Even if scenes are unpacked for a build, binary compression should account for a few orders of magnitude improvement.

    Problem: There seems to be zero tools available to diagnose the cause of the size of the levels.
    113MB of raw scene data seems absurd.

    Failed Attempts:
    • Building the levels as asset bundles: Total size of all levels is 52MB compressed, 318MB uncompressed, which is odd as it doesn't match the above.
    • Building the APK with only the bootstrapper level outputs 37MB. 37MB + 52MB != 141MB??

    • Using the BuildReport API gives us the following file and packedAsset tables:
      upload_2021-1-20_12-20-11.png upload_2021-1-20_12-22-14.png
      Which give useful information, but again it's hard to diagnose which ones are included as "Level" sizes as prefab data is included.

    • https://docs.unity3d.com/Manual/AssetBundles-Browser.html does not contain useful unpacked data about level sizes.

    • https://github.com/DerPopo/UABE does not work with 2019.4 yet, although it would allow us to view the individual packed asset sizes.

    • Based on a bunch of threads, we've disabled static batching.
    Related Links:
    https://docs.unity3d.com/Manual/ReducingFilesize.html
    https://forum.unity.com/threads/scene-level-size-is-too-much.327102/
    https://forum.unity.com/threads/player-size-statistics-level.103601/
    https://answers.unity.com/questions/1352782/why-are-the-levels-editor-log-from-build-size-so-b.html
    https://forum.unity.com/threads/reducing-build-size-for-a-ui-game.618622/

    https://forum.unity.com/threads/how-to-reduce-the-android-app-build-size.438119/
    https://forum.unity.com/threads/reducing-build-size-of-level.594412/

    Any support here would be appreciated. Thanks!
     
  2. el_Guero

    el_Guero

    Joined:
    Sep 15, 2017
    Posts:
    185
    Have you ever resolved this? I have 450mb levels size (98% of my entire export), static batching is disabled (and I don't used it) and I have only 1 scene. My levels are prefabs and I built the game with only 3 levels yet the size was exactly the same (each individual level prefab is listed as 100-200kb of size and I only have 80 levels.

    Really no idea on how to reduce this.
     
  3. HAMILCAR_TECHNOLOGIES

    HAMILCAR_TECHNOLOGIES

    Joined:
    Dec 14, 2018
    Posts:
    12
    have you managed to solve this ?
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,520
  5. alfaondo

    alfaondo

    Joined:
    Dec 29, 2019
    Posts:
    1
    Have you used any specific asset like SNOWIFY or something like that? Because unity shows its data under level section on the build log.
    Also don't forget to disable STATIC BATCHING.