public void ShaderPropertiesGUI(Material material) { EditorGUI.BeginChangeCheck(); { m_MaterialScopeList.DrawHeaders(materialEditor, material); if (EditorGUI.EndChangeCheck()) { UpdateMaterials(materialEditor); } } }
/// <summary> /// Override this function to implement your custom GUI. To display a user interface similar to HDRP shaders, use a MaterialUIBlockList. /// </summary> /// <param name="materialEditor">The current material editor.</param> /// <param name="props">The list of properties the material has.</param> public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) { DecalMeshWarning(); m_MaterialEditor = materialEditor; FindProperties(props); Material material = materialEditor.target as Material; using (var changed = new EditorGUI.ChangeCheckScope()) { m_MaterialScopeList.DrawHeaders(materialEditor, material); } // We should always do this call at the end materialEditor.serializedObject.ApplyModifiedProperties(); }
public void ShaderPropertiesGUI(Material material) { m_MaterialScopeList.DrawHeaders(materialEditor, material); }
void ShaderPropertiesGUI(MaterialEditor materialEditor, Material material, MaterialProperty[] properties) { m_MaterialScopeList.DrawHeaders(materialEditor, material); }