(Fix) Loading Screen

This commit is contained in:
2026-06-24 17:28:54 +02:00
parent 7291acab91
commit 144b3bfbc4
18 changed files with 1257 additions and 548 deletions
+8 -2
View File
@@ -147,13 +147,19 @@ namespace Ashwild.UI
}
/// <summary>
/// Leaves the session and returns to the main menu scene.
/// Leaves the session and returns to the main menu scene behind the loading curtain. The
/// transition is owned by the persistent NetworkSessionManager (it survives the scene swap,
/// this manager does not); falls back to a direct, uncovered load only if it is missing.
/// </summary>
public void QuitToMenu()
{
if (NetworkSessionManager.Instance != null)
NetworkSessionManager.Instance.StopSession();
{
NetworkSessionManager.Instance.ReturnToMenu(menuSceneName);
return;
}
Debug.LogWarning("[GameUIManager] NetworkSessionManager missing — loading menu directly without the loading curtain.", this);
SceneManager.LoadScene(menuSceneName);
}