Add a new option when entering play mode to always restore to the editor window after exiting play mode. Also made it the default option on new projects.

This commit is contained in:
Jake Young
2026-08-07 16:08:29 -04:00
parent 70498fa42c
commit 6489b7d7b7
3 changed files with 22 additions and 5 deletions
@@ -287,6 +287,7 @@ namespace FlaxEditor.Modules
case Options.InterfaceOptions.PlayModeFocus.None: break;
case Options.InterfaceOptions.PlayModeFocus.GameWindow:
case Options.InterfaceOptions.PlayModeFocus.GameWindowThenRestoreEditor:
gameWin.FocusGameViewport();
break;
@@ -320,6 +321,11 @@ namespace FlaxEditor.Modules
_previousWindow.Focus();
}
break;
case Options.InterfaceOptions.PlayModeFocus.GameWindowThenRestoreEditor:
var editorWin = Editor.Windows.EditWin;
if (editorWin != null && !editorWin.IsDisposing)
editorWin.Focus();
break;
}
}