From e857ae4d24936a124db7f4e284bf29057fb29199 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Sat, 6 Nov 2021 20:14:29 +0100 Subject: [PATCH] Fix entering play mode in Editor with pause mode on start --- Source/Editor/Modules/SimulationModule.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Source/Editor/Modules/SimulationModule.cs b/Source/Editor/Modules/SimulationModule.cs index 3faf5cd7e..fb65671cf 100644 --- a/Source/Editor/Modules/SimulationModule.cs +++ b/Source/Editor/Modules/SimulationModule.cs @@ -68,11 +68,6 @@ namespace FlaxEditor.Modules BreakpointHangEnd?.Invoke(); } - /// - /// Checks if play mode should start only with single frame update and then enter step mode. - /// - public bool ShouldPlayModeStartWithStep => Editor.UI.IsPauseButtonChecked; - /// /// Returns true if play mode has been requested. /// @@ -242,10 +237,9 @@ namespace FlaxEditor.Modules _isPlayModeRequested = false; // Enter play mode + var shouldPlayModeStartWithStep = Editor.UI.IsPauseButtonChecked; Editor.StateMachine.GoToState(); - - // Check if move just by one frame - if (ShouldPlayModeStartWithStep) + if (shouldPlayModeStartWithStep) { RequestPausePlay(); }