private static void MaterialChanged(Material material, StandardShaderGUI.WorkflowMode workflowMode) { if (material.GetFloat("_EmissionScaleUI") < 0f) { material.SetFloat("_EmissionScaleUI", 0f); } Color color = StandardShaderGUI.EvalFinalEmissionColor(material); material.SetColor("_EmissionColor", color); StandardShaderGUI.SetupMaterialWithBlendMode(material, (StandardShaderGUI.BlendMode)material.GetFloat("_Mode")); StandardShaderGUI.SetMaterialKeywords(material, workflowMode); }
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) { this.FindProperties(props); this.m_MaterialEditor = materialEditor; Material target = materialEditor.target as Material; if (this.m_FirstTimeApply) { StandardShaderGUI.SetMaterialKeywords(target, this.m_WorkflowMode); this.m_FirstTimeApply = false; } this.ShaderPropertiesGUI(target); }
private static void MaterialChanged(Material material, StandardShaderGUI.WorkflowMode workflowMode) { StandardShaderGUI.SetupMaterialWithBlendMode(material, (StandardShaderGUI.BlendMode)material.GetFloat("_Mode")); StandardShaderGUI.SetMaterialKeywords(material, workflowMode); }