Beispiel #1
0
        public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props)
        {
            material            = materialEditor.target as Material;
            this.props          = props;
            this.materialEditor = materialEditor;

            // Init
            Prop.Initialize(props);
            Layout.Initialize(materialEditor);
            ShaderSetup.Initialize(materialEditor);

            if (ShaderSetup.isProjector)
            {
                ShaderPropertiesGUI(material);
            }
            else
            {
                base.OnGUI(materialEditor, props);
            }

            if (firstTimeApply)
            {
                ShaderSetup.MaterialChanged();
                firstTimeApply = false;
            }
        }
Beispiel #2
0
 public override void AssignNewShaderToMaterial(Material material, Shader oldShader, Shader newShader)
 {
     ShaderSetup.Initialize(material, newShader);
     base.AssignNewShaderToMaterial(material, oldShader, newShader);
     ShaderSetup.MaterialChanged();
 }