public AtlasContents GetSourcesForAtlasTexture(Texture atlasTexture) { AtlasContents atlasContents = new AtlasContents(); atlasContents.atlasTexture = atlasTexture; atlasContents.atlasTexture = atlasTexture; foreach (SheetMapping sheetMapping in this.m_data) { if (sheetMapping.atlas.mainTexture == atlasTexture) { atlasContents.sources.Add(sheetMapping.source); } } return(atlasContents); }
public List <AtlasContents> GetSourcesByAtlasTexture() { List <AtlasContents> list = new List <AtlasContents>(); HashSet <Texture> hashSet = new HashSet <Texture>(); foreach (SheetMapping sheetMapping in this.m_data) { hashSet.Add(sheetMapping.atlas.mainTexture); } foreach (Texture atlasTexture in hashSet) { AtlasContents sourcesForAtlasTexture = this.GetSourcesForAtlasTexture(atlasTexture); list.Add(sourcesForAtlasTexture); } return(list); }