Merge pull request #177 from SHADE-DP/SP3-6-c-scripting
Scenes are now reloaded and scripts are no longer lost when building scripts
This commit is contained in:
commit
a5c0456eb7
|
@ -117,16 +117,22 @@ namespace SHADE
|
|||
auto* scriptEngine = static_cast<SHScriptEngine*>(SHSystemManager::GetSystem<SHScriptEngine>());
|
||||
scriptEngine->GenerateScriptsCsProjFile();
|
||||
}
|
||||
ImGui::BeginDisabled(SHSystemManager::GetSystem<SHEditor>()->editorState != SHEditor::State::STOP);
|
||||
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::EndDisabled();
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue