Example #1
0
 public static string GetString(this SpriteNames spriteName)
 {
     if (spriteName == SpriteNames.Astronaut)
     {
         return(spriteName.ToString());
     }
     return(spriteName + "(Clone)");
 }
// SPRITE SELECTOR================================================================
    public void SpriteSelect()
    {
        if (selectedSprite != lastSprite || selectedSprite == lastSprite)
        {
            SpriteAtlasRender.sprite = atlas.GetSprite(selectedSprite.ToString());             // accesses the sprites under the atlas and changes it to a string in the editor

            lastSprite = selectedSprite;
        }
    }