mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 17:56:04 +08:00
[Unity Bugfix] SkeletonAnimationInspector interfering with outside behaviour control of animation. Left TODO for further improvement later
This commit is contained in:
parent
4f636e3f56
commit
ae8637f267
@ -67,6 +67,7 @@ public class SkeletonAnimationInspector : SkeletonRendererInspector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//TODO: Refactor this to use GenericMenu and callbacks to avoid interfering with control by other behaviours.
|
||||||
// Animation name.
|
// Animation name.
|
||||||
{
|
{
|
||||||
String[] animations = new String[component.skeleton.Data.Animations.Count + 1];
|
String[] animations = new String[component.skeleton.Data.Animations.Count + 1];
|
||||||
@ -85,8 +86,10 @@ public class SkeletonAnimationInspector : SkeletonRendererInspector {
|
|||||||
EditorGUILayout.EndHorizontal();
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
String selectedAnimationName = animationIndex == 0 ? null : animations[animationIndex];
|
String selectedAnimationName = animationIndex == 0 ? null : animations[animationIndex];
|
||||||
component.AnimationName = selectedAnimationName;
|
if(component.AnimationName != selectedAnimationName){
|
||||||
animationName.stringValue = selectedAnimationName;
|
component.AnimationName = selectedAnimationName;
|
||||||
|
animationName.stringValue = selectedAnimationName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user