1 [
ComponentEditorProps(
category:
"GameScripted/Editor", description:
"Game simulation manager. Works only with SCR_EditorManagerEntity!", icon:
"WBData/ComponentEditorProps/componentEditor.png")]
10 [
Attribute(
"1",
desc:
"When enabled, the editor will be paused when opened.")]
11 protected bool m_bPauseOnOpen;
20 SetPause(!
m_World.IsGameTimePaused());
26 void SetPause(
bool pause)
31 SCR_RewindComponent rewindManager = SCR_RewindComponent.GetInstance();
32 if (rewindManager && !rewindManager.HasRewindPoint())
33 rewindManager.CreateRewindPoint();
43 return m_World.IsGameTimePaused();
50 void SetPauseOnOpen(
bool pause)
52 m_bPauseOnOpen = pause;
59 return m_bPauseOnOpen;
68 override protected void EOnEditorOpen()
70 GetGame().GetSaveManager().GetOnSaved().Insert(OnSaved);
75 SCR_RewindComponent rewindManager = SCR_RewindComponent.GetInstance();
76 if (rewindManager && !rewindManager.HasRewindPoint())
77 GetGame().GetCallqueue().CallLater(SetPause, 1,
false,
true);
80 override protected void EOnEditorClose()
82 GetGame().GetSaveManager().GetOnSaved().Remove(OnSaved);
87 override protected void EOnEditorInit()
92 if (
GetGame().IsDev() && System.IsCLIParam(
"editorDoNotPauseOnOpen"))
93 m_bPauseOnOpen =
false;