Exemple #1
0
 public AtlasListView(AtlasUsages UsageInfo)
 {
     atlasUsage = UsageInfo;
       foreach(SpriteLink usage in atlasUsage.UsedSprites.Values) {
     spriteViews[usage.sprite] = new AtlasListSpriteView(usage);
       }
 }
Exemple #2
0
        public void SetUp()
        {
            GameObject go = new GameObject();
              atlas = go.AddComponent<UIAtlas>();
              sprite = go.AddComponent<UISprite>();
              sprite.atlas = atlas;
              sprite.spriteName = "testSprite";

              UISpriteData[] spriteDatas = new UISpriteData[] {
            new UISpriteData() {
              name = "available"
            },
            new UISpriteData() {
              name = "unused"
            }
              };

              sprite.spriteName = "available";
              atlas.spriteList.AddRange(spriteDatas);

              usages = new AtlasUsages(atlas);
        }