Skip to content

Commit

Permalink
Navigathema blank scene is now unloaded when scene loaded.
Browse files Browse the repository at this point in the history
  • Loading branch information
mackysoft committed Feb 14, 2024
1 parent f4a4f5a commit a8c8168
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ async UniTask TryFinalizeAndUnloadCurrentScene (SceneHistoryEntry currentSceneEn
// NOTE: If the current scene is the only scene, create an empty scene to prevent an exception from being thrown when unloading.
if (SceneManager.sceneCount < 2)
{
SceneManager.CreateScene("Navigathena Blank");
await NavigathenaBlankSceneIdentifier.Instance.CreateHandle().Load(cancellationToken: cancellationToken);
}

await m_CurrentSceneState.Value.Handle.Unload(m_SceneProgressFactory.CreateProgress(progressDataStore, progress), cancellationToken);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ public static async UniTask<SceneState> LoadSceneAndGetEntryPoint (ISceneIdentif
Scene loadedScene = await sceneHandle.Load(sceneProgressFactory.CreateProgress(progressDataStore, progress), cancellationToken);
cancellationToken.ThrowIfCancellationRequested();

await NavigathenaBlankSceneIdentifier.Instance.CreateHandle().Unload(cancellationToken: cancellationToken);
cancellationToken.ThrowIfCancellationRequested();

var sceneEntryPoint = loadedScene.GetComponentInScene<ISceneEntryPoint>(true);
return new SceneState(scene, sceneHandle, sceneEntryPoint);
}
Expand Down

0 comments on commit a8c8168

Please sign in to comment.