void OnSelectionChange() { #if !UNITY_2019_1_OR_NEWER GizmoUtils.ToggleGizmos(true); #endif // Debug.Log ("Window.OnSelectionChange"); if (sceneManipulator.Sync()) { // Debug.Log ("Changed"); } // Always repaint as we need to change inactive gui Repaint(); }
void OnFocus() { // Remove to make sure it's not added, then add it once #if UNITY_2019_1_OR_NEWER SceneView.duringSceneGui -= this.OnSceneGUI; SceneView.duringSceneGui += this.OnSceneGUI; SceneView.beforeSceneGui -= this.OnBeforeSceneGUI; SceneView.beforeSceneGui += this.OnBeforeSceneGUI; #else SceneView.onSceneGUIDelegate -= this.OnSceneGUI; SceneView.onSceneGUIDelegate += this.OnSceneGUI; GizmoUtils.ToggleGizmos(true); #endif }