Esempio n. 1
0
        public ShaderTemplate AddShaderTemplate(ShaderTemplate e)
        {
            this.template      = Object.Instantiate(e);
            this.template.name = this.template.name.Replace("(Clone)", string.Empty);
            RefreshShaderTemplateMask();
            var Template_Container = this.EditorContent_Elements.Q("Shader-Template_Container");

            template.SetupElements(Template_Container, this);
            return(this.template);
        }
Esempio n. 2
0
 public override void OnEnable(SeanLibManager drawer)
 {
     template = null;
     shaderTemplates.Clear();
     elementTemplates.Clear();
     shaderPresets.Clear();
     elements.Clear();
     elementTemplates.AddRange(AssetDBHelper.LoadAssets <ShaderElement>("t:" + typeof(ShaderElement)));
     shaderTemplates.AddRange(AssetDBHelper.LoadAssets <ShaderTemplate>("t:" + typeof(ShaderTemplate)));
     shaderPresets.AddRange(AssetDBHelper.LoadAssets <ShaderPreset>("t:" + typeof(ShaderPreset)));
     base.OnEnable(drawer);
 }
Esempio n. 3
0
        public void Clear()
        {
            Object.DestroyImmediate(template);
            template = null;
            var Template_Container = this.EditorContent_Elements.Q("Shader-Template_Container");

            Template_Container.Clear();
            for (int i = elements.Count - 1; i >= 0; i--)
            {
                DeleteElement(elements[i]);
            }
            RefreshShaderTemplateMask();
        }