13
13
14
14
Variant ToolbarDock::disablePlayInEditor (const Event* e)
15
15
{
16
- m_InEditorPlaying = false ;
16
+ m_ToolbarDockSettings. m_InEditorPlaying = false ;
17
17
EditorApplication::GetSingleton ()->setGameMode (false );
18
18
if (!m_StartPlayingScene.empty ())
19
19
{
@@ -48,7 +48,7 @@ void ToolbarDock::draw(float deltaMilliseconds)
48
48
" Play Game"
49
49
};
50
50
51
- if (m_InEditorPlaying)
51
+ if (m_ToolbarDockSettings. m_InEditorPlaying )
52
52
{
53
53
ImColor lightErrorColor = EditorSystem::GetSingleton ()->getFatalColor ();
54
54
lightErrorColor.Value .x *= 0 .8f ;
@@ -67,21 +67,21 @@ void ToolbarDock::draw(float deltaMilliseconds)
67
67
switch (playModeSelected)
68
68
{
69
69
case 0 :
70
- m_InEditorPlaying = true ;
70
+ m_ToolbarDockSettings. m_InEditorPlaying = true ;
71
71
m_StartPlayingScene = SceneLoader::GetSingleton ()->getCurrentScene ()->getScenePath ();
72
72
EventManager::GetSingleton ()->call (EditorEvents::EditorSaveAll);
73
73
EditorApplication::GetSingleton ()->setGameMode (true );
74
74
SceneLoader::GetSingleton ()->loadScene (m_StartPlayingScene, {});
75
75
PRINT (" Loaded Scene in Editor" );
76
76
break ;
77
77
case 1 :
78
- m_InEditorPlaying = false ;
78
+ m_ToolbarDockSettings. m_InEditorPlaying = false ;
79
79
EventManager::GetSingleton ()->call (EditorEvents::EditorSaveAll);
80
80
OS::RunApplication (" \" " + OS::GetGameExecutablePath () + " \" " + SceneLoader::GetSingleton ()->getCurrentScene ()->getScenePath ());
81
81
PRINT (" Launched Game process with Scene" );
82
82
break ;
83
83
case 2 :
84
- m_InEditorPlaying = false ;
84
+ m_ToolbarDockSettings. m_InEditorPlaying = false ;
85
85
EventManager::GetSingleton ()->call (EditorEvents::EditorSaveAll);
86
86
OS::RunApplication (" \" " + OS::GetGameExecutablePath () + " \" " );
87
87
PRINT (" Launched Game process" );
0 commit comments