소스 검색

[unity] Fixed SkeletonUtilityEyeConstraint wrong offset when disabled and re-enabled. Closes #1632.

Harald Csaszar 5 년 전
부모
커밋
216193e4b3

+ 4 - 0
spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonUtility Modules/SkeletonUtilityEyeConstraint.cs

@@ -56,6 +56,10 @@ namespace Spine.Unity.Examples {
 
 		protected override void OnDisable () {
 			if (!Application.isPlaying) return;
+
+			for (int i = 0; i < eyes.Length; i++) {
+				eyes[i].localPosition = origins[i];
+			}
 			base.OnDisable();
 		}