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