public void NextLevel() { StarController sc = StarController.sc; AudioController.ac.ForegroundVolume(); int levelIndex = sc.GetLevelIndex(SceneData.sd.levelID); levelIndex += 1; Debug.Log("Incremented level index : " + levelIndex.ToString()); if (levelIndex >= sc.starData.allStars.Count || sc.starData.TotalStarsGotten() < sc.starData.allStars[levelIndex].starRequirement) { //BackToMenu(); return; } SceneData.sd.levelID = sc.starData.allStars[levelIndex].levelId; sc.LoadStarData(); Transition.t.FadeToScene(1); }