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

Is Crunch Compression supported for Android in Cloud Build?

Discussion in 'Unity Build Automation' started by LilGames, Jan 15, 2020.

  1. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    520
    I just went through the pain of manually configuring lots of texture assets to use Crunch compression, and now in Cloud Build I get a ton of these warnings:

    RGB Compressed ETC UNorm format is not supported, decompressing texture

    I've searched and googled and I can't find an explanation of what "UNorm" is. I can only assume it relates to having turned on Crunch.

    Anyways, it defeats the purpose of compressing all these assets if the Build process then decompresses them. What do I do?

    Settings are pretty much the default:
    Max size 2048
    Resize Algorithm: mitchell
    Format: Automatic
    Compression: Normal Quality
    Use Crunch: checked on for some assets

    What should ETC2 fallback be set to?
     
  2. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    520
    Still waiting for some input:
    • Windows build size: 84mb
    • WebGL: 80mb
    • Android: 207 mb
    Something is seriously wrong here.

    Notes on currently used settings:
    • I put the bulk of 2D sprite textures into atlases and compressed using crunch.
    • In Build settings, Android compression is set to ETC2
    • ETC2 fallback is set to 32-bit, half-resolution.
    • Compression: Default
    Through all this, I got Windows and WebGL builds down to under 100mb, while Android is still stuck at over 200mb.
     
  3. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    520
    FeedMyData, Whitepot and JonBFS like this.
  4. mace44

    mace44

    Joined:
    Feb 8, 2017
    Posts:
    15
  5. mace44

    mace44

    Joined:
    Feb 8, 2017
    Posts:
    15
    Found my problem. It was a problem with the model. It was a Blender file which UCB doesn't support.
     
  6. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    520
    As you mentioned, your problem was not with texture settings, but to answer the question, in case others come here looking for answers related to texture compression and crunch:

    In Platform-specific texture import override settings, I set Android to use "RGBA Crunched ETC2". This covers most devices. And for devices that might not support ETC2, we added additional code for Android fallbacks rather than relying on the single fallback in the Build settings. We added this to a prebuild class:

    Code (CSharp):
    1. #if UNITY_ANDROID
    2.         EditorUserBuildSettings.androidBuildSubtarget = MobileTextureSubtarget.ETC2;
    3. #if HIGH_QUALITY_32
    4.         EditorUserBuildSettings.androidETC2Fallback = AndroidETC2Fallback.Quality32Bit;
    5. #else
    6.         EditorUserBuildSettings.androidETC2Fallback = AndroidETC2Fallback.Quality16Bit;
    7. #endif
    8. #endif