private void LoadSprites(string animationName) { if (spriteAtlas == null) { return; } var referenceName = string.Format("SpriteAnimation.{0}", spriteAtlas.GetInstanceID()); spriteCache = new SpriteAtlasCache(spriteAtlas, referenceName); animationCount = 0; while (true) { var spriteName = GetSpriteName(animationCount); var sprite = spriteCache.GetSprite(spriteName); if (sprite == null) { break; } animationCount++; } }
internal static SpriteData GetSpriteData(SpriteAtlas atlas, string spriteName) { if (s_SpriteAtlasMap == null) { s_SpriteAtlasMap = new Dictionary <int, SpriteData[]>(); } if (s_SpriteAtlasMap.TryGetValue(atlas.GetInstanceID(), out SpriteData[] list))