瀏覽代碼

[unity] Add IkConstraint compress and uniform to SkeletonDebugWindow.

pharan 7 年之前
父節點
當前提交
aef9261d40
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      spine-unity/Assets/Spine/Editor/spine-unity/Editor/SkeletonDebugWindow.cs

+ 5 - 1
spine-unity/Assets/Spine/Editor/spine-unity/Editor/SkeletonDebugWindow.cs

@@ -371,12 +371,16 @@ namespace Spine.Unity.Editor {
 									foreach (var c in skeleton.IkConstraints) {
 										EditorGUILayout.LabelField(SpineInspectorUtility.TempContent(c.Data.Name, Icons.constraintIK));
 										FalseDropDown("Goal", c.Data.Target.Name, Icons.bone, true);
+										using (new EditorGUI.DisabledGroupScope(true)) {
+											EditorGUILayout.Toggle(SpineInspectorUtility.TempContent("Data.Uniform", tooltip: "Uniformly scales a bone when Ik stretches or compresses."), c.Data.Uniform);
+										}
 
 										EditorGUI.BeginChangeCheck();
 										c.Mix = EditorGUILayout.Slider("Mix", c.Mix, MixMin, MixMax);
 										c.BendDirection = EditorGUILayout.Toggle(SpineInspectorUtility.TempContent("Bend Clockwise", tooltip: "IkConstraint.BendDirection == 1 if clockwise; -1 if counterclockwise."), c.BendDirection > 0) ? 1 : -1;
+										c.Compress = EditorGUILayout.Toggle(SpineInspectorUtility.TempContent("Compress", tooltip: "Compress single bone IK when the target too close. Not applied when parent bone has nonuniform scale."), c.Compress);
 										c.Stretch = EditorGUILayout.Toggle(SpineInspectorUtility.TempContent("Stretch", tooltip: "Stretch the parent bone when the target is out of range. Not applied when parent bone has nonuniform scale."), c.Stretch);
-										if (EditorGUI.EndChangeCheck())	requireRepaint = true;
+										if (EditorGUI.EndChangeCheck()) requireRepaint = true;
 
 										EditorGUILayout.Space();
 									}