Răsfoiți Sursa

[unity] SkeletonAnimation inspector exception bugfix. Occurred when switching assigned SkeletonDataAsset from an invalid to a valid one.

Harald Csaszar 4 ani în urmă
părinte
comite
bce5500290

+ 1 - 1
spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonAnimationInspector.cs

@@ -90,7 +90,7 @@ namespace Spine.Unity.Editor {
 
 		protected void TrySetAnimation (SkeletonAnimation skeletonAnimation) {
 			if (skeletonAnimation == null) return;
-			if (!skeletonAnimation.valid)
+			if (!skeletonAnimation.valid || skeletonAnimation.AnimationState == null)
 				return;
 
 			TrackEntry current = skeletonAnimation.AnimationState.GetCurrent(0);