mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 09:16:01 +08:00
[unity] Fixed broken inspector preview in Unity7 2019. Closes #1331.
This commit is contained in:
parent
b99df7286a
commit
299ffc6de8
@ -30,7 +30,7 @@
|
||||
|
||||
#define SPINE_SKELETON_MECANIM
|
||||
|
||||
#if (UNITY_2017_4 || UNITY_2018)
|
||||
#if (UNITY_2017_4 || UNITY_2018_1_OR_NEWER )
|
||||
#define SPINE_UNITY_2018_PREVIEW_API
|
||||
#endif
|
||||
|
||||
|
||||
@ -106,8 +106,13 @@ namespace Spine.Unity.Editor {
|
||||
}
|
||||
|
||||
void OnSelectionChange () {
|
||||
#if UNITY_2019_1_OR_NEWER
|
||||
SceneView.duringSceneGui -= this.OnSceneGUI;
|
||||
SceneView.duringSceneGui += this.OnSceneGUI;
|
||||
#else
|
||||
SceneView.onSceneGUIDelegate -= this.OnSceneGUI;
|
||||
SceneView.onSceneGUIDelegate += this.OnSceneGUI;
|
||||
#endif
|
||||
|
||||
bool noSkeletonRenderer = false;
|
||||
|
||||
@ -148,7 +153,11 @@ namespace Spine.Unity.Editor {
|
||||
isPrefab = false;
|
||||
boneName = string.Empty;
|
||||
bone = null;
|
||||
#if UNITY_2019_1_OR_NEWER
|
||||
SceneView.duringSceneGui -= this.OnSceneGUI;
|
||||
#else
|
||||
SceneView.onSceneGUIDelegate -= this.OnSceneGUI;
|
||||
#endif
|
||||
}
|
||||
|
||||
void OnDestroy () {
|
||||
|
||||
@ -201,8 +201,13 @@ namespace Spine.Unity.Editor {
|
||||
Icons.Initialize();
|
||||
|
||||
// Drag and Drop
|
||||
#if UNITY_2019_1_OR_NEWER
|
||||
SceneView.duringSceneGui -= DragAndDropInstantiation.SceneViewDragAndDrop;
|
||||
SceneView.duringSceneGui += DragAndDropInstantiation.SceneViewDragAndDrop;
|
||||
#else
|
||||
SceneView.onSceneGUIDelegate -= DragAndDropInstantiation.SceneViewDragAndDrop;
|
||||
SceneView.onSceneGUIDelegate += DragAndDropInstantiation.SceneViewDragAndDrop;
|
||||
#endif
|
||||
|
||||
EditorApplication.hierarchyWindowItemOnGUI -= HierarchyHandler.HandleDragAndDrop;
|
||||
EditorApplication.hierarchyWindowItemOnGUI += HierarchyHandler.HandleDragAndDrop;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user