Skip to content

Commit 2228791

Browse files
committed
Auto focus on Viewport when leaving Play Mode.
1 parent cb7c5ac commit 2228791

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Prowl.Editor/PlayMode.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,10 @@ public static void Stop()
5555

5656
SceneManager.RestoreScene();
5757
SceneManager.ClearStoredScene();
58+
59+
// Focus SceneViewWindow
60+
var sceneView = EditorGuiManager.Windows.FirstOrDefault(w => w is SceneViewWindow);
61+
if (sceneView != null && GeneralPreferences.Instance.AutoFocusGameView)
62+
EditorGuiManager.FocusWindow(sceneView);
5863
}
5964
}

0 commit comments

Comments
 (0)