public AssetImageStackLayer AddLayer(string name) { foreach (AssetImageStackLayer layer in this.m_Layers) { if (layer.name == name) { throw new Exception("A layer with given name already exists"); } } AssetImageStackLayer item = new AssetImageStackLayer(base.m_Path, name, base.authorId); this.m_Layers.Add(item); return item; }
public AssetImageStackLayer AddLayer(string name) { foreach (AssetImageStackLayer layer in this.m_Layers) { if (layer.name == name) { throw new Exception("A layer with given name already exists"); } } AssetImageStackLayer item = new AssetImageStackLayer(base.m_Path, name, base.authorId); this.m_Layers.Add(item); return(item); }
public AssetImageStackLayer AddLayer(string name) { foreach (AssetCatalogItem assetCatalogItem in this.m_Layers) { if (assetCatalogItem.name == name) { throw new Exception("A layer with given name already exists"); } } AssetImageStackLayer assetImageStackLayer = new AssetImageStackLayer(this.m_Path, name, this.authorId); this.m_Layers.Add(assetImageStackLayer); return(assetImageStackLayer); }
public AssetImageStackLayer AddLayer(string name) { foreach (var layer in m_Layers) { if (layer.name == name) { throw new Exception("A layer with given name already exists"); } } var newLayer = new AssetImageStackLayer(m_Path, name, authorId); m_Layers.Add(newLayer); return(newLayer); }