UpdateTexture() static private method

Combine all sprites into a single texture and save it to disk.
static private UpdateTexture ( UIAtlas, atlas, List sprites ) : Texture2D
atlas UIAtlas,
sprites List
return UnityEngine.Texture2D
コード例 #1
0
    private void AddOrUpdate(UIAtlas atlas, List <SpriteEntry> sprites)
    {
        if (sprites.Count > 0)
        {
            // Combine all sprites into a single texture and save it
            if (UIAtlasMaker.UpdateTexture(atlas, sprites))
            {
                // Replace the sprites within the atlas
                UIAtlasMaker.ReplaceSprites(atlas, sprites);
            }

            // Release the temporary textures
            UIAtlasMaker.ReleaseSprites(sprites);
            EditorUtility.ClearProgressBar();
            return;
        }
    }