private void Awake() { if (sceneManagerLiteInstance != null) { Debug.Log("More than one Scene Manager Lite in scene"); return; } sceneManagerLiteInstance = this; // This loads the first actual content scene upon starting the game along with the objects in the permanent Logic scene. // This should load the Main Menu along with the persistent Logic scene LoadScene(mainMenuBuildIndex); }
//public int buildIndexLevelSelector; #endregion #region Unity Methods // TODO: This shouldn't need to go through the entire for loop every time you load this scene. private void Start() { sceneManagerLiteReference = SceneManagerLite.GetInstance(); int levelReached = PlayerPrefs.GetInt("levelReached", 1); //buildIndexLevelSelector = SceneManager.GetActiveScene().buildIndex; //Debug.Log("LevelSelector: buildIndexLevelSelector is set to: " + buildIndexLevelSelector); for (int i = 0; i < levelButtons.Length; i++) { //if(i + buildIndexLevelSelector > levelReached) if (i > levelReached) { levelButtons[i].interactable = false; } } }
private void Start() { sceneManagerLiteReference = SceneManagerLite.GetInstance(); }
private void Start() { sceneManagerLiteReference = SceneManagerLite.GetInstance(); levelManager = GetComponent <LevelManager>(); }