Assets/Scripts/System/GameStateManager/GameStateManager.cs
/// <summary>
/// Callback function for when we want to change the current scene.
/// </summary>
/// <param name="o">Should be the name of the next scene.</param>
Callback function for when we want to change the current scene.
Callback function for when we want to change the current scene .
private void ChangeSceneEvent(object o)
    {
        string nextSceneName = o as string;
        if (scenes.Contains(nextSceneName))
        {
            SceneManager.LoadScene(nextSceneName);
        }
        else
        {
            Debug.LogError($"Scene [{nextSceneName}] not found.");
        }
    }
private void ChangeSceneEvent ( object o ) { string nextSceneName = o as string ; if ( scenes . Contains ( nextSceneName ) ) { SceneManager . LoadScene ( nextSceneName ) ; } else { Debug . LogError ( $" Scene [ { nextSceneName } ] not found. " ) ; } }
Callback function for when we want to change the current scene.
Callback function for when we want to change the current scene .
o
object
Should be the name of the next scene.
Should be the name of the next scene .