瀏覽代碼

[unity] Fixed SkeletonAnimationMulti sample component showing wrong first frame after switching skeletons. Closes #1598.

Harald Csaszar 5 年之前
父節點
當前提交
ce61d429fd

+ 3 - 1
spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonAnimationMulti/SkeletonAnimationMulti.cs

@@ -139,7 +139,9 @@ namespace Spine.Unity {
 			if (skeletonAnimation != null) {
 				SetActiveSkeleton(skeletonAnimation);
 				skeletonAnimation.skeleton.SetToSetupPose();
-				return skeletonAnimation.state.SetAnimation(MainTrackIndex, animation, loop);
+				var trackEntry = skeletonAnimation.state.SetAnimation(MainTrackIndex, animation, loop);
+				skeletonAnimation.Update(0);
+				return trackEntry;
 			}
 
 			return null;