Fix entering play mode in Editor with pause mode on start

This commit is contained in:
Wojtek Figat
2021-11-06 20:14:29 +01:00
parent ddbc76cc7d
commit e857ae4d24

View File

@@ -68,11 +68,6 @@ namespace FlaxEditor.Modules
BreakpointHangEnd?.Invoke();
}
/// <summary>
/// Checks if play mode should start only with single frame update and then enter step mode.
/// </summary>
public bool ShouldPlayModeStartWithStep => Editor.UI.IsPauseButtonChecked;
/// <summary>
/// Returns true if play mode has been requested.
/// </summary>
@@ -242,10 +237,9 @@ namespace FlaxEditor.Modules
_isPlayModeRequested = false;
// Enter play mode
var shouldPlayModeStartWithStep = Editor.UI.IsPauseButtonChecked;
Editor.StateMachine.GoToState<PlayingState>();
// Check if move just by one frame
if (ShouldPlayModeStartWithStep)
if (shouldPlayModeStartWithStep)
{
RequestPausePlay();
}