Strip debug logging from the game, fix screen weirdness

This commit is contained in:
Michal Pikulski
2025-10-14 15:53:58 +02:00
parent 18be597424
commit e8180b21bf
65 changed files with 768 additions and 411 deletions

View File

@@ -86,7 +86,7 @@ namespace UI
if(!isMainMenu)
HidePauseMenu(false); // Ensure menu is hidden when switching to a game level
Debug.Log($"[PauseMenu] Setting pause menu active: {!isMainMenu} for scene: {levelName}");
Logging.Debug($"[PauseMenu] Setting pause menu active: {!isMainMenu} for scene: {levelName}");
}
/// <summary>
@@ -105,7 +105,7 @@ namespace UI
InputManager.Instance.SetInputMode(InputMode.UI);
OnGamePaused?.Invoke();
Debug.Log("[PauseMenu] Game Paused");
Logging.Debug("[PauseMenu] Game Paused");
}
/// <summary>
@@ -124,7 +124,7 @@ namespace UI
InputManager.Instance.SetInputMode(InputMode.GameAndUI);
OnGameResumed?.Invoke();
Debug.Log("[PauseMenu] Game Resumed");
Logging.Debug("[PauseMenu] Game Resumed");
}
/// <summary>
@@ -141,7 +141,7 @@ namespace UI
public async void ExitToMainMenu()
{
// Replace with the actual scene name as set in Build Settings
var progress = new Progress<float>(p => Debug.Log($"Loading progress: {p * 100:F0}%"));
var progress = new Progress<float>(p => Logging.Debug($"Loading progress: {p * 100:F0}%"));
await SceneManagerService.Instance.SwitchSceneAsync("MainMenu", progress);
}
@@ -156,6 +156,12 @@ namespace UI
Application.Quit();
#endif
}
public async void ReloadLevel()
{
var progress = new Progress<float>(p => Logging.Debug($"Loading progress: {p * 100:F0}%"));
await SceneManagerService.Instance.ReloadCurrentScene(progress);
}
/// <summary>
/// Loads a level based on the selection from a dropdown menu.
@@ -168,7 +174,7 @@ namespace UI
HidePauseMenu();
// Replace with the actual scene name as set in Build Settings
var progress = new Progress<float>(p => Debug.Log($"Loading progress: {p * 100:F0}%"));
var progress = new Progress<float>(p => Logging.Debug($"Loading progress: {p * 100:F0}%"));
switch (levelSelection)
{
case 0: