/// <summary>Following the settings in the Skin fields, load sprites into an UI atlas.
 /// Longer list of atlas keys can be loaded into one atlas.</summary>
 /// <param name="loadingPath">Path inside Resources. directory (dot separated).</param>
 /// <param name="spriteWidth">When loading assume this width.</param>
 /// <param name="spriteHeight">When loading assume this height.</param>
 /// <param name="hintAtlasTextureSize">Square atlas of this size is created.</param>
 /// <param name="atlasKeyset">List of atlas keys to load under the loadingPath. Created by
 /// calling CreateAtlasKeysList() on a ButtonSkin.</param>
 /// <returns>New UI atlas.</returns>
 public UITextureAtlas CreateAtlas(string loadingPath,
                                   int spriteWidth,
                                   int spriteHeight,
                                   int hintAtlasTextureSize,
                                   HashSet <string> atlasKeyset)
 {
     return(TextureUtil.CreateAtlas(
                atlasName: $"TMPE_U_{Prefix}_Atlas",
                resourcePrefix: loadingPath,
                spriteNames: atlasKeyset.ToArray(),
                spriteWidth: spriteWidth,
                spriteHeight: spriteHeight,
                hintAtlasTextureSize: hintAtlasTextureSize));
 }
Пример #2
0
 /// <summary>Following the settings in the Skin fields, load sprites into an UI atlas.
 /// Longer list of atlas keys can be loaded into one atlas.</summary>
 /// <param name="loadingPath">Path inside Resources. directory (dot separated).</param>
 /// <param name="spriteWidth">When loading assume this width.</param>
 /// <param name="spriteHeight">When loading assume this height.</param>
 /// <param name="hintAtlasTextureSize">Square atlas of this size is created.</param>
 /// <param name="atlasKeyset">List of atlas keys to load under the loadingPath. Created by
 /// calling CreateAtlasKeysList() on a ButtonSkin.</param>
 /// <returns>New UI atlas.</returns>
 public UITextureAtlas CreateAtlas(string loadingPath,
                                   int spriteWidth,
                                   int spriteHeight,
                                   int hintAtlasTextureSize,
                                   HashSet <string> atlasKeyset)
 {
     return(TextureUtil.CreateAtlas(
                $"TMPE_U_{Prefix}_Atlas",
                loadingPath,
                atlasKeyset.ToArray(),
                spriteWidth,
                spriteHeight,
                hintAtlasTextureSize));
 }