diff --git a/Assets/Scripts/UI/UIManager.cs b/Assets/Scripts/UI/UIManager.cs index f787ad5..0a95105 100644 --- a/Assets/Scripts/UI/UIManager.cs +++ b/Assets/Scripts/UI/UIManager.cs @@ -104,8 +104,11 @@ public void CloseAnyMenu() { #region State-Changing Methods public void Continue() { - if (SceneManager.GetActiveScene().buildIndex + 1 >= SceneManager.sceneCountInBuildSettings) + bool isLastLevel = SceneManager.GetActiveScene().buildIndex + 1 >= SceneManager.sceneCountInBuildSettings; + if (isLastLevel) { GameManager.Instance.LoadLevel(0); + return; + } GameManager.Instance.LoadLevel(SceneManager.GetActiveScene().buildIndex + 1); }