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

This commit is contained in:
Harald Csaszar 2021-02-11 20:26:25 +01:00
parent 3bf9c3508f
commit bce5500290

View File

@ -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);