浏览代码

[unity] Fixed Sprite shader render queue property being too limited. Now using normal int property instead of range slider and displaying the result render queue below. Closes #1737.

Harald Csaszar 5 年之前
父节点
当前提交
996cbeaac4
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/Shaders/SpineSpriteShaderGUI.cs

+ 6 - 6
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Shaders/SpineSpriteShaderGUI.cs

@@ -157,7 +157,7 @@ public class SpineSpriteShaderGUI : SpineShaderWithOutlineGUI {
 		new GUIContent("Multiply"),
 		new GUIContent("Multiply"),
 		new GUIContent("Multiply x2")
 		new GUIContent("Multiply x2")
 	};
 	};
-	static GUIContent _rendererQueueText = new GUIContent("Renderer Queue");
+	static GUIContent _rendererQueueText = new GUIContent("Render Queue Offset");
 	static GUIContent _cullingModeText = new GUIContent("Culling Mode");
 	static GUIContent _cullingModeText = new GUIContent("Culling Mode");
 	static GUIContent[] _cullingModeOptions = { new GUIContent("Off"), new GUIContent("Front"), new GUIContent("Back") };
 	static GUIContent[] _cullingModeOptions = { new GUIContent("Off"), new GUIContent("Front"), new GUIContent("Back") };
 	static GUIContent _pixelSnapText = new GUIContent("Pixel Snap");
 	static GUIContent _pixelSnapText = new GUIContent("Pixel Snap");
@@ -169,7 +169,7 @@ public class SpineSpriteShaderGUI : SpineShaderWithOutlineGUI {
 	static GUIContent _rimPowerText = new GUIContent("Rim Power");
 	static GUIContent _rimPowerText = new GUIContent("Rim Power");
 	static GUIContent _specularToggleText = new GUIContent("Specular", "Enable Specular.");
 	static GUIContent _specularToggleText = new GUIContent("Specular", "Enable Specular.");
 	static GUIContent _colorAdjustmentToggleText = new GUIContent("Color Adjustment", "Enable material color adjustment.");
 	static GUIContent _colorAdjustmentToggleText = new GUIContent("Color Adjustment", "Enable material color adjustment.");
-	static GUIContent _colorAdjustmentColorText = new GUIContent("Overlay Color & Alpha");
+	static GUIContent _colorAdjustmentColorText = new GUIContent("Overlay Color");
 	static GUIContent _colorAdjustmentHueText = new GUIContent("Hue");
 	static GUIContent _colorAdjustmentHueText = new GUIContent("Hue");
 	static GUIContent _colorAdjustmentSaturationText = new GUIContent("Saturation");
 	static GUIContent _colorAdjustmentSaturationText = new GUIContent("Saturation");
 	static GUIContent _colorAdjustmentBrightnessText = new GUIContent("Brightness");
 	static GUIContent _colorAdjustmentBrightnessText = new GUIContent("Brightness");
@@ -404,13 +404,13 @@ public class SpineSpriteShaderGUI : SpineShaderWithOutlineGUI {
 			}
 			}
 		}
 		}
 
 
-		//	GUILayout.Label(Styles.advancedText, EditorStyles.boldLabel);
-		//	m_MaterialEditor.RenderQueueField();
-		//	m_MaterialEditor.EnableInstancingField();
+		EditorGUI.BeginDisabledGroup(true);
+		_materialEditor.RenderQueueField();
+		EditorGUI.EndDisabledGroup();
 
 
 		EditorGUI.BeginChangeCheck();
 		EditorGUI.BeginChangeCheck();
 		EditorGUI.showMixedValue = _renderQueue.hasMixedValue;
 		EditorGUI.showMixedValue = _renderQueue.hasMixedValue;
-		int renderQueue = EditorGUILayout.IntSlider(_rendererQueueText, (int)_renderQueue.floatValue, 0, 49);
+		int renderQueue = EditorGUILayout.IntField(_rendererQueueText, (int)_renderQueue.floatValue);
 		if (EditorGUI.EndChangeCheck()) {
 		if (EditorGUI.EndChangeCheck()) {
 			SetInt("_RenderQueue", renderQueue);
 			SetInt("_RenderQueue", renderQueue);
 			dataChanged = true;
 			dataChanged = true;