From 96d73ca626711d2c62c993cb2848c2180a6fcbf7 Mon Sep 17 00:00:00 2001 From: SHAM-DP Date: Fri, 3 Mar 2023 20:06:58 +0800 Subject: [PATCH] added ifdef check for editor --- .../src/Editor/EditorWindow/AssetBrowser/SHAssetBrowser.cpp | 2 ++ SHADE_Engine/src/Editor/SHEditor.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/SHADE_Engine/src/Editor/EditorWindow/AssetBrowser/SHAssetBrowser.cpp b/SHADE_Engine/src/Editor/EditorWindow/AssetBrowser/SHAssetBrowser.cpp index a0aaf0fa..a6e506b5 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/AssetBrowser/SHAssetBrowser.cpp +++ b/SHADE_Engine/src/Editor/EditorWindow/AssetBrowser/SHAssetBrowser.cpp @@ -376,7 +376,9 @@ namespace SHADE { if(editor->LoadScene(asset->id)) { +#ifdef SHEDITOR editor->editorConfig->workingSceneID = asset->id; +#endif } } break; diff --git a/SHADE_Engine/src/Editor/SHEditor.cpp b/SHADE_Engine/src/Editor/SHEditor.cpp index 346bfbed..6d71f98d 100644 --- a/SHADE_Engine/src/Editor/SHEditor.cpp +++ b/SHADE_Engine/src/Editor/SHEditor.cpp @@ -592,8 +592,10 @@ namespace SHADE { //Load the scene sceneToLoad = 0; +#ifdef SHEDITOR editorConfig->workingSceneID = assetID; SHConfigurationManager::SaveEditorConfig(); +#endif SHSceneManager::RestartScene(assetID); return true; } -- 2.40.1