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

Cloud Build and ETC2 Fallback

Discussion in 'Unity Build Automation' started by ferretnt, Jan 29, 2018.

  1. ferretnt

    ferretnt

    Joined:
    Apr 10, 2012
    Posts:
    412
    Does UCB support the options as in the build window for ETC2 fallback (32-bit, 16 bit, or 32-bit half resolution?) Or are all UCB builds just decompressing ETC2 to full-size 32-bit?

    We are seeing elevated crash rates in Google Play Console since switching to UCB, and suspect this is the reason.
     
    Rakeshraj likes this.
  2. DominikP

    DominikP

    Joined:
    Apr 28, 2015
    Posts:
    4
    You can add Pre-Export method which will be called when building on cloud. Below you can find example of such method (File has to be in Editor folder).

    Code (CSharp):
    1. using UnityEditor;
    2.  
    3. public static class PreExportMethod
    4. {
    5.     #if UNITY_CLOUD_BUILD
    6.     public static void SetETC2Fallback(UnityEngine.CloudBuild.BuildManifestObject  manifest)
    7.     {
    8.         EditorUserBuildSettings.androidETC2Fallback = AndroidETC2Fallback.Quality32BitDownscaled;
    9.     }
    10.     #endif
    11. }
    Then you can select this method in "Advanced Options" of your android config on the Cloud Build.
     
  3. ferretnt

    ferretnt

    Joined:
    Apr 10, 2012
    Posts:
    412