Sfoglia il codice sorgente

[unity] IkConstraint.stretch

pharan 7 anni fa
parent
commit
3d52f1a7e2

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

@@ -375,6 +375,7 @@ namespace Spine.Unity.Editor {
 										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.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;
 
 										EditorGUILayout.Space();

+ 1 - 0
spine-unity/Assets/Spine/Runtime/spine-unity/SkeletonExtensions.cs

@@ -503,6 +503,7 @@ namespace Spine {
 				ikc = skeleton.ikConstraints.Items[i];
 				ikc.mix = ikc.data.mix;
 				ikc.bendDirection = ikc.data.bendDirection;
+				ikc.stretch = ikc.data.stretch;
 				break;
 
 			// TransformConstraint