Skip to content

Commit

Permalink
Fix warning on unity 2019
Browse files Browse the repository at this point in the history
  • Loading branch information
litefeel committed May 19, 2019
1 parent 57fb050 commit 1893a8a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Editor/AlignToolsWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,21 @@ private void OnEnable()
{
Utils.editorPath = System.IO.Path.GetDirectoryName(AssetDatabase.GetAssetPath(MonoScript.FromScriptableObject(this)));

#if UNITY_2019_1_OR_NEWER
SceneView.duringSceneGui += OnSceneGUI;
#else
SceneView.onSceneGUIDelegate += OnSceneGUI;
#endif
EditorApplication.hierarchyWindowItemOnGUI += OnHierarchyWindowItemOnGUI;
}

private void OnDisable()
{
#if UNITY_2019_1_OR_NEWER
SceneView.duringSceneGui -= OnSceneGUI;
#else
SceneView.onSceneGUIDelegate -= OnSceneGUI;
#endif
EditorApplication.hierarchyWindowItemOnGUI -= OnHierarchyWindowItemOnGUI;
}

Expand Down

0 comments on commit 1893a8a

Please sign in to comment.