Fix play mode runtime scene replacement
This commit is contained in:
@@ -46,6 +46,18 @@ void SceneRuntime::Stop() {
|
||||
m_scene = nullptr;
|
||||
}
|
||||
|
||||
void SceneRuntime::ReplaceScene(Scene* scene) {
|
||||
if (!m_running) {
|
||||
m_scene = scene;
|
||||
m_uiRuntime->Reset();
|
||||
return;
|
||||
}
|
||||
|
||||
m_scene = scene;
|
||||
m_uiRuntime->Reset();
|
||||
Scripting::ScriptEngine::Get().OnRuntimeSceneReplaced(scene);
|
||||
}
|
||||
|
||||
void SceneRuntime::FixedUpdate(float fixedDeltaTime) {
|
||||
if (!m_running || !m_scene || !m_scene->IsActive()) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user