diff --git a/Assets/Nova/Editor/Core/Scripts/MaterialEditorUtility.cs b/Assets/Nova/Editor/Core/Scripts/MaterialEditorUtility.cs index 362320b1..45af7148 100644 --- a/Assets/Nova/Editor/Core/Scripts/MaterialEditorUtility.cs +++ b/Assets/Nova/Editor/Core/Scripts/MaterialEditorUtility.cs @@ -187,9 +187,11 @@ public static void DrawSmallTexture(MaterialEditor editor, string label, Materia textureRect.width = mapHeight; using (var changeCheckScope = new EditorGUI.ChangeCheckScope()) { + EditorGUI.showMixedValue = textureProp.hasMixedValue; var texture = (Texture)EditorGUI.ObjectField(textureRect, textureProp.textureValue, textureType, false); + EditorGUI.showMixedValue = false; if (changeCheckScope.changed) { editor.RegisterPropertyChangeUndo(textureProp.name); @@ -342,8 +344,10 @@ private static void DrawTexture(MaterialEditor editor, MaterialProperty textureP using (var changeCheckScope = new EditorGUI.ChangeCheckScope()) { + EditorGUI.showMixedValue = textureProperty.hasMixedValue; var texture = (Texture)EditorGUI.ObjectField(textureRect, textureProperty.textureValue, textureType, false); + EditorGUI.showMixedValue = false; if (changeCheckScope.changed) { editor.RegisterPropertyChangeUndo(textureProperty.name); @@ -375,7 +379,6 @@ private static void DrawTexture(MaterialEditor editor, MaterialProperty textureP if (drawTilingAndOffset) using (var changeCheckScope = new EditorGUI.ChangeCheckScope()) { - ; var textureScaleAndOffset = textureProperty.textureScaleAndOffset; var tiling = new Vector2(textureScaleAndOffset.x, textureScaleAndOffset.y); var offset = new Vector2(textureScaleAndOffset.z, textureScaleAndOffset.w); @@ -574,8 +577,9 @@ public static void DrawToggleProperty(MaterialEditor editor, string label, Mater using (var ccs = new EditorGUI.ChangeCheckScope()) { + EditorGUI.showMixedValue = property.hasMixedValue; isOn = EditorGUI.Toggle(rect, isOn); - + EditorGUI.showMixedValue = false; if (ccs.changed) { editor.RegisterPropertyChangeUndo(property.name); @@ -599,7 +603,9 @@ public static void DrawVector2Property(MaterialEditor editor, string label, Mate using (var ccs = new EditorGUI.ChangeCheckScope()) { + EditorGUI.showMixedValue = property.hasMixedValue; value = EditorGUI.Vector2Field(rect, string.Empty, value); + EditorGUI.showMixedValue = false; if (ccs.changed) {