mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[unity] Fixed Bone Name selector only displaying root bone on Unity 2023.2. Closes #2556.
This commit is contained in:
parent
0337d4a029
commit
5d37fac0fc
@ -29,6 +29,10 @@
|
|||||||
|
|
||||||
// Contributed by: Mitch Thompson
|
// Contributed by: Mitch Thompson
|
||||||
|
|
||||||
|
#if UNITY_2023_2_OR_NEWER
|
||||||
|
#define MENU_REQUIRES_DIFFERENT_NESTED_NAME
|
||||||
|
#endif
|
||||||
|
|
||||||
using Spine;
|
using Spine;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -590,9 +594,13 @@ namespace Spine.Unity.Editor {
|
|||||||
// jointName = "root/hip/bone" to show a hierarchial tree.
|
// jointName = "root/hip/bone" to show a hierarchial tree.
|
||||||
string jointName = name;
|
string jointName = name;
|
||||||
BoneData iterator = bone;
|
BoneData iterator = bone;
|
||||||
while ((iterator = iterator.Parent) != null)
|
while ((iterator = iterator.Parent) != null) {
|
||||||
|
#if MENU_REQUIRES_DIFFERENT_NESTED_NAME
|
||||||
|
jointName = string.Format("{0} /{1}", iterator.Name, jointName);
|
||||||
|
#else
|
||||||
jointName = string.Format("{0}/{1}", iterator.Name, jointName);
|
jointName = string.Format("{0}/{1}", iterator.Name, jointName);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
menu.AddItem(new GUIContent(jointName), !property.hasMultipleDifferentValues && name == property.stringValue, HandleSelect, new SpineDrawerValuePair(name, property));
|
menu.AddItem(new GUIContent(jointName), !property.hasMultipleDifferentValues && name == property.stringValue, HandleSelect, new SpineDrawerValuePair(name, property));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"name": "com.esotericsoftware.spine.spine-unity",
|
"name": "com.esotericsoftware.spine.spine-unity",
|
||||||
"displayName": "spine-unity Runtime",
|
"displayName": "spine-unity Runtime",
|
||||||
"description": "This plugin provides the spine-unity runtime core.",
|
"description": "This plugin provides the spine-unity runtime core.",
|
||||||
"version": "4.2.71",
|
"version": "4.2.72",
|
||||||
"unity": "2018.3",
|
"unity": "2018.3",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Esoteric Software",
|
"name": "Esoteric Software",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user