(Fix) Loading Screen
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user