|
@@ -29,6 +29,10 @@
|
|
|
|
|
|
// Contributed by: Mitch Thompson
|
|
|
|
|
|
+#if UNITY_2023_2_OR_NEWER
|
|
|
+#define MENU_REQUIRES_DIFFERENT_NESTED_NAME
|
|
|
+#endif
|
|
|
+
|
|
|
using Spine;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
@@ -587,9 +591,13 @@ namespace Spine.Unity.Editor {
|
|
|
// jointName = "root/hip/bone" to show a hierarchial tree.
|
|
|
string jointName = name;
|
|
|
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);
|
|
|
-
|
|
|
+#endif
|
|
|
+ }
|
|
|
menu.AddItem(new GUIContent(jointName), !property.hasMultipleDifferentValues && name == property.stringValue, HandleSelect, new SpineDrawerValuePair(name, property));
|
|
|
}
|
|
|
}
|