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

How save changes after update atlas?

Discussion in 'Editor & General Support' started by Galimski, Apr 30, 2020.

  1. Galimski

    Galimski

    Joined:
    Apr 11, 2019
    Posts:
    25
    Hi! I tried to update an atlas format, but it doesn't apply for the atlas.
    Code (CSharp):
    1.             var platformTextureSettings = spriteAtlas.GetPlatformSettings(EditorUserBuildSettings.activeBuildTarget.ToString());
    2.             platformTextureSettings.overridden = true;
    3.             platformTextureSettings.format = textureFormat;
    4.  
    5.             if (compressionQuality.HasValue)
    6.             {
    7.                 platformTextureSettings.compressionQuality = compressionQuality.Value;
    8.             }
    9.  
    10.             spriteAtlas.SetPlatformSettings(platformTextureSettings);
     
  2. Galimski

    Galimski

    Joined:
    Apr 11, 2019
    Posts:
    25
    The problem was only for ios. When you use GetPlatformSettings for ios, you need to use 'iPhone' instead of 'iOS'.