Skip to content

Commit 137b842

Browse files
Merge pull request #213 from Tweety-Lab/Development
Auto focus on Viewport when leaving Play Mode.
2 parents cb7c5ac + 2228791 commit 137b842

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)