Simplify to return main window even in editor.

This commit is contained in:
Chandler Cox
2023-09-30 21:36:41 -05:00
parent 85a985cd7f
commit 113307ddf9
2 changed files with 2 additions and 6 deletions

View File

@@ -183,11 +183,7 @@ void Screen::SetGameWindowMode(GameWindowMode windowMode)
Window* Screen::GetMainWindow()
{
Window* win = nullptr;
#if !USE_EDITOR
win = Engine::MainWindow;
#endif
return win;
return Engine::MainWindow;
}
void ScreenService::Update()

View File

@@ -98,7 +98,7 @@ DECLARE_SCRIPTING_TYPE_NO_SPAWN(Screen);
API_PROPERTY() static void SetGameWindowMode(GameWindowMode windowMode);
/// <summary>
/// Gets the main window. Only during built game.
/// Gets the main window.
/// </summary>
/// <returns>The current window. Will be null if fails.</returns>
API_PROPERTY() static Window* GetMainWindow();