Fix play mode in Editor error

This commit is contained in:
Wojciech Figat
2022-06-28 16:07:22 +02:00
parent 56322005e2
commit ea34207d07

View File

@@ -231,7 +231,7 @@ namespace FlaxEditor.Modules
if (_isPlayModeRequested)
{
// Check if editor has been compiled and scripting reloaded (there is no pending reload action)
if ((ScriptsBuilder.IsReady || !Editor.Options.Options.General.AutoReloadScriptsOnMainWindowFocus) && !Level.IsAnyActionPending)
if ((ScriptsBuilder.IsReady || !Editor.Options.Options.General.AutoReloadScriptsOnMainWindowFocus) && !Level.IsAnyActionPending && Level.IsAnySceneLoaded)
{
// Clear flag
_isPlayModeRequested = false;