|
@@ -34,7 +34,7 @@ using UnityEngine;
|
|
using UnityEngine.Timeline;
|
|
using UnityEngine.Timeline;
|
|
|
|
|
|
namespace Spine.Unity.Editor {
|
|
namespace Spine.Unity.Editor {
|
|
-
|
|
|
|
|
|
+#if UNITY_2019_1_OR_NEWER
|
|
[CustomTimelineEditor(typeof(SpineAnimationStateGraphicTrack))]
|
|
[CustomTimelineEditor(typeof(SpineAnimationStateGraphicTrack))]
|
|
[CanEditMultipleObjects]
|
|
[CanEditMultipleObjects]
|
|
public class SpineAnimationStateGraphicTrackInspector : TrackEditor {
|
|
public class SpineAnimationStateGraphicTrackInspector : TrackEditor {
|
|
@@ -46,4 +46,22 @@ namespace Spine.Unity.Editor {
|
|
return options;
|
|
return options;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+#else
|
|
|
|
+ [CustomEditor(typeof(SpineAnimationStateGraphicTrack))]
|
|
|
|
+ [CanEditMultipleObjects]
|
|
|
|
+ public class SpineAnimationStateGraphicTrackInspector : UnityEditor.Editor {
|
|
|
|
+
|
|
|
|
+ protected SerializedProperty trackIndexProperty = null;
|
|
|
|
+
|
|
|
|
+ public void OnEnable () {
|
|
|
|
+ trackIndexProperty = serializedObject.FindProperty("trackIndex");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public override void OnInspectorGUI () {
|
|
|
|
+ serializedObject.Update();
|
|
|
|
+ EditorGUILayout.PropertyField(trackIndexProperty);
|
|
|
|
+ serializedObject.ApplyModifiedProperties();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
}
|
|
}
|