Scenes are now reloaded and scripts are no longer lost when building scripts
This commit is contained in:
parent
29c25c2d6d
commit
06afd384af
|
@ -120,12 +120,16 @@ namespace SHADE
|
|||
if (ImGui::Selectable("Build Scripts - Debug"))
|
||||
{
|
||||
auto* scriptEngine = static_cast<SHScriptEngine*>(SHSystemManager::GetSystem<SHScriptEngine>());
|
||||
SHSerialization::SerializeSceneToFile(SHSceneManager::GetCurrentSceneAssetID());
|
||||
scriptEngine->BuildScriptAssembly(true, true);
|
||||
SHSceneManager::RestartScene(SHSceneManager::GetCurrentSceneAssetID());
|
||||
}
|
||||
if (ImGui::Selectable("Build Scripts - Release"))
|
||||
{
|
||||
auto* scriptEngine = static_cast<SHScriptEngine*>(SHSystemManager::GetSystem<SHScriptEngine>());
|
||||
SHSerialization::SerializeSceneToFile(SHSceneManager::GetCurrentSceneAssetID());
|
||||
scriptEngine->BuildScriptAssembly(false, true);
|
||||
SHSceneManager::RestartScene(SHSceneManager::GetCurrentSceneAssetID());
|
||||
}
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue