From 16e12ff37d485d0972da1d64fc6610e0da32b31c Mon Sep 17 00:00:00 2001 From: Antoine Pilote Date: Sat, 16 Mar 2024 16:36:45 -0400 Subject: [PATCH] unselect when entering playmode --- Editor/src/Windows/EditorInterface.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Editor/src/Windows/EditorInterface.cpp b/Editor/src/Windows/EditorInterface.cpp index 591493c9..0c535e4e 100644 --- a/Editor/src/Windows/EditorInterface.cpp +++ b/Editor/src/Windows/EditorInterface.cpp @@ -119,14 +119,14 @@ namespace Nuake { if (ImGui::Button(ICON_FA_PAUSE, ImVec2(30, 30)) || (Input::IsKeyPressed(GLFW_KEY_F5))) { Engine::ExitPlayMode(); - + Engine::LoadScene(SceneSnapshot); Selection = EditorSelection(); } } else { - if (ImGui::Button(ICON_FA_PLAY, ImVec2(30, 30)) || (Input::IsKeyPressed(GLFW_KEY_F5))) + if (ImGui::Button(ICON_FA_PLAY, ImVec2(30, 30))) { this->SceneSnapshot = Engine::GetCurrentScene()->Copy(); @@ -135,6 +135,8 @@ namespace Nuake { ScriptingEngineNet::Get().BuildProjectAssembly(Engine::GetProject()); }; + Selection = EditorSelection(); + JobSystem::Get().Dispatch(job, []() { Engine::EnterPlayMode(); }); }