diff --git a/Assets/Resources/Levels/99.prefab b/Assets/Resources/Levels/8.prefab similarity index 100% rename from Assets/Resources/Levels/99.prefab rename to Assets/Resources/Levels/8.prefab diff --git a/Assets/Resources/Levels/99.prefab.meta b/Assets/Resources/Levels/8.prefab.meta similarity index 100% rename from Assets/Resources/Levels/99.prefab.meta rename to Assets/Resources/Levels/8.prefab.meta diff --git a/Assets/Scripts/Level/LevelManager.cs b/Assets/Scripts/Level/LevelManager.cs index f028fec..592569a 100644 --- a/Assets/Scripts/Level/LevelManager.cs +++ b/Assets/Scripts/Level/LevelManager.cs @@ -77,6 +77,12 @@ namespace Level { DisableAllLevels(); + if (!Levels.ContainsKey(levelNumber)) + { + UIManager.Instance.SwitchToCanvas("Level Selection Menu"); + return; + } + currentLevel = Levels[levelNumber]; currentLevel.Enable();