Przeglądaj źródła

[Unity] Now really fixed SkeletonRootMotion out of bounds access when selecting non-default Root Motion Bone with a TransformConstraint. See #2110.

Harald Csaszar 3 lat temu
rodzic
commit
696c723013

+ 1 - 1
spine-unity/Assets/Spine/Runtime/spine-unity/Components/RootMotion/SkeletonRootMotionBase.cs

@@ -443,7 +443,7 @@ namespace Spine.Unity {
 		int GetConstraintLastPosIndex (int constraintIndex) {
 			var constraints = skeletonComponent.Skeleton.TransformConstraints;
 			TransformConstraint targetConstraint = constraints.Items[constraintIndex];
-			return constraints.FindIndex(constraint => constraint == targetConstraint);
+			return transformConstraintIndices.FindIndex(addedIndex => addedIndex == constraintIndex);
 		}
 
 		void FindTransformConstraintsAffectingBone () {