private void OnEnable() { previousState = GameManager.Instance.GetGameState(); // Save previous state (could be MainMenu or PauseMenu). GameManager.Instance.SetGameState(GameManager.StateType.Options); // Set current state to Options. lastSelected = graphicQualityDropdown.gameObject; // Use the first button of the options menu for the selection EventSystem. if (myEventSystem != null) { myEventSystem.GetComponent <EventSystem>().SetSelectedGameObject(lastSelected); } }
// Use this for initialization void OnEnable() { state = StateType.DEFAULT; //get song choice //passes meta data to the BeatManager conductor.getSong(ap.selectedSong); //plays the song ap.selectedSong.songFile.Play(); //gets the time the song started playing dsptimesong = (float)AudioSettings.dspTime; conductor.setdsptimesong(dsptimesong); }