mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-03 22:29:13 +08:00
[unity] Handle animation not found.
This commit is contained in:
parent
45c67ee4bc
commit
613b098b53
@ -161,8 +161,11 @@ namespace Spine.Unity {
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (!string.IsNullOrEmpty(_animationName)) {
|
if (!string.IsNullOrEmpty(_animationName)) {
|
||||||
state.SetAnimation(0, _animationName, loop);
|
var animationObject = skeletonDataAsset.GetSkeletonData(false).FindAnimation(_animationName);
|
||||||
Update(0);
|
if (animationObject != null) {
|
||||||
|
state.SetAnimation(0, animationObject, loop);
|
||||||
|
Update(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user