Update logging calls to new system
This commit is contained in:
@@ -35,7 +35,7 @@ namespace Bootstrap
|
||||
|
||||
internal override void OnManagedAwake()
|
||||
{
|
||||
LogDebugMessage("BootSceneController.Awake() - Initializing loading screen DURING bootstrap");
|
||||
Logging.Debug("BootSceneController.Awake() - Initializing loading screen DURING bootstrap");
|
||||
|
||||
// Validate loading screen exists
|
||||
if (initialLoadingScreen == null)
|
||||
@@ -71,7 +71,7 @@ namespace Bootstrap
|
||||
|
||||
internal override void OnManagedStart()
|
||||
{
|
||||
LogDebugMessage("BootSceneController.OnManagedStart() - Boot is GUARANTEED complete, starting scene loading");
|
||||
Logging.Debug("BootSceneController.OnManagedStart() - Boot is GUARANTEED complete, starting scene loading");
|
||||
|
||||
// Boot is GUARANTEED complete at this point - that's the whole point of OnManagedStart!
|
||||
// No need to subscribe to OnBootCompleted or check CustomBoot.Initialised
|
||||
@@ -100,12 +100,12 @@ namespace Bootstrap
|
||||
/// </summary>
|
||||
private void OnInitialLoadingComplete()
|
||||
{
|
||||
LogDebugMessage("Initial loading screen fully hidden, boot sequence completed");
|
||||
Logging.Debug("Initial loading screen fully hidden, boot sequence completed");
|
||||
|
||||
// Play the intro cinematic if available
|
||||
if (CinematicsManager.Instance != null)
|
||||
{
|
||||
LogDebugMessage("Attempting to play intro cinematic");
|
||||
Logging.Debug("Attempting to play intro cinematic");
|
||||
|
||||
// Use LoadAndPlayCinematic to play the intro sequence
|
||||
CinematicsManager.Instance.LoadAndPlayCinematic("IntroSequence", false);
|
||||
@@ -147,13 +147,13 @@ namespace Bootstrap
|
||||
{
|
||||
if (debugMode)
|
||||
{
|
||||
LogDebugMessage($"Bootstrap progress: {progress:P0}, Combined: {GetCombinedProgress():P0}");
|
||||
Logging.Debug($"Bootstrap progress: {progress:P0}, Combined: {GetCombinedProgress():P0}");
|
||||
}
|
||||
}
|
||||
|
||||
private void LogDebugInfo()
|
||||
{
|
||||
LogDebugMessage($"Debug - Phase: {_currentPhase}, Bootstrap: {CustomBoot.CurrentProgress:P0}, " +
|
||||
Logging.Debug($"Debug - Phase: {_currentPhase}, Bootstrap: {CustomBoot.CurrentProgress:P0}, " +
|
||||
$"Scene: {_sceneLoadingProgress:P0}, Combined: {GetCombinedProgress():P0}, Boot Complete: {_bootComplete}");
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace Bootstrap
|
||||
|
||||
private async void LoadMainScene()
|
||||
{
|
||||
LogDebugMessage($"Loading main menu scene: {mainSceneName}");
|
||||
Logging.Debug($"Loading main menu scene: {mainSceneName}");
|
||||
|
||||
try
|
||||
{
|
||||
@@ -184,7 +184,7 @@ namespace Bootstrap
|
||||
|
||||
if (debugMode)
|
||||
{
|
||||
LogDebugMessage($"Scene loading raw: {value:P0}, Combined: {GetCombinedProgress():P0}");
|
||||
Logging.Debug($"Scene loading raw: {value:P0}, Combined: {GetCombinedProgress():P0}");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -208,13 +208,13 @@ namespace Bootstrap
|
||||
_sceneLoadingProgress = 1f;
|
||||
|
||||
// CRITICAL: Broadcast lifecycle events so components get their OnSceneReady callbacks
|
||||
LogDebugMessage($"Broadcasting OnSceneReady for: {mainSceneName}");
|
||||
Logging.Debug($"Broadcasting OnSceneReady for: {mainSceneName}");
|
||||
LifecycleManager.Instance?.BroadcastSceneReady(mainSceneName);
|
||||
|
||||
// Restore scene data for the main menu
|
||||
if (SaveLoadManager.Instance != null)
|
||||
{
|
||||
LogDebugMessage($"Restoring scene data for: {mainSceneName}");
|
||||
Logging.Debug($"Restoring scene data for: {mainSceneName}");
|
||||
SaveLoadManager.Instance.RestoreSceneData();
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ namespace Bootstrap
|
||||
Scene currentScene = SceneManager.GetActiveScene();
|
||||
string startingSceneName = currentScene.name;
|
||||
|
||||
LogDebugMessage($"Unloading StartingScene: {startingSceneName}");
|
||||
Logging.Debug($"Unloading StartingScene: {startingSceneName}");
|
||||
|
||||
// Unload the StartingScene
|
||||
await SceneManager.UnloadSceneAsync(startingSceneName);
|
||||
@@ -253,14 +253,14 @@ namespace Bootstrap
|
||||
Scene mainMenuScene = SceneManager.GetSceneByName(mainSceneName);
|
||||
SceneManager.SetActiveScene(mainMenuScene);
|
||||
|
||||
LogDebugMessage($"Transition complete: {startingSceneName} unloaded, {mainSceneName} is now active");
|
||||
Logging.Debug($"Transition complete: {startingSceneName} unloaded, {mainSceneName} is now active");
|
||||
|
||||
// Destroy the boot scene controller since its job is done
|
||||
Destroy(gameObject);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logging.Warning($"[BootSceneController] Error unloading StartingScene: {e.Message}");
|
||||
Logging.Warning($"Error unloading StartingScene: {e.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,13 +281,5 @@ namespace Bootstrap
|
||||
_progressAction?.Invoke(value);
|
||||
}
|
||||
}
|
||||
|
||||
private void LogDebugMessage(string message)
|
||||
{
|
||||
if ( _logVerbosity <= LogVerbosity.Debug)
|
||||
{
|
||||
Logging.Debug($"[BootSceneController] {message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user