From ea34207d0719b1eefd3568d566d0f4af7dd79147 Mon Sep 17 00:00:00 2001 From: Wojciech Figat Date: Tue, 28 Jun 2022 16:07:22 +0200 Subject: [PATCH] Fix play mode in Editor error --- Source/Editor/Modules/SimulationModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Editor/Modules/SimulationModule.cs b/Source/Editor/Modules/SimulationModule.cs index bad94846f..0994ce9f0 100644 --- a/Source/Editor/Modules/SimulationModule.cs +++ b/Source/Editor/Modules/SimulationModule.cs @@ -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;