mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[unity] Fix AnimationReferenceAsset inspector without SkeletonDataAsset.
This commit is contained in:
parent
debc5801c8
commit
d3a38367e1
@ -63,8 +63,15 @@ namespace Spine.Unity.Editor {
|
||||
public override void OnInspectorGUI () {
|
||||
animationNameProperty = animationNameProperty ?? serializedObject.FindProperty("animationName");
|
||||
string animationName = animationNameProperty.stringValue;
|
||||
Animation animation = ThisSkeletonDataAsset.GetSkeletonData(true).FindAnimation(animationName);
|
||||
bool animationNotFound = animation == null;
|
||||
|
||||
Animation animation = null;
|
||||
if (ThisSkeletonDataAsset != null) {
|
||||
var skeletonData = ThisSkeletonDataAsset.GetSkeletonData(true);
|
||||
if (skeletonData != null) {
|
||||
animation = skeletonData.FindAnimation(animationName);
|
||||
}
|
||||
}
|
||||
bool animationNotFound = (animation == null);
|
||||
|
||||
if (changeNextFrame) {
|
||||
changeNextFrame = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user