public void DeleteElement(ShaderElement se) { se.OnDestory(); elements.Remove(se); var delete = ShaderElementsContainer.Q(se.TemplateName); ShaderElementsContainer.Remove(delete); Object.DestroyImmediate(se); }
public ShaderElement AddShadeElement(ShaderElement e) { var count = elements.FindAll(e1 => e1.GetType() == e.GetType()).Count; var instance = Object.Instantiate(e); elements.Add(instance); instance.name = instance.name.Replace("(Clone)", count.ToString()); instance.SetupElements(ShaderElementsContainer, this); return(instance); }