소스 검색

[unity] Fixed ignored SkeletonAnimation looping change when AnimationName is the same. Closes #1396.

Harald Csaszar 6 년 전
부모
커밋
b1c1dac17a
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonAnimation.cs

+ 5 - 2
spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonAnimation.cs

@@ -96,8 +96,11 @@ namespace Spine.Unity {
 				}
 			}
 			set {
-				if (_animationName == value)
-					return;
+				if (_animationName == value) {
+					TrackEntry entry = state.GetCurrent(0);
+					if (entry != null && entry.loop == loop)
+						return;
+				}
 				_animationName = value;
 
 				if (string.IsNullOrEmpty(value)) {