private void Start() { worldNumCap = worldObjects.Count - 1; soundController = transform.parent.GetComponent <MenuSoundController>(); menuMaster = GameObject.Find("Main Menu Master").GetComponent <MainMenuMaster>(); }
void Awake() { if (_instance == null) { //If I am the first instance, make me the Singleton _instance = this; DontDestroyOnLoad(this); } else { //If a Singleton already exists and you find //another reference in scene, destroy it! if (this != _instance) { Destroy(this.gameObject); } } }
private void Start() { soundController = transform.parent.GetComponent <MenuSoundController>(); menuMaster = GameObject.Find("Main Menu Master").GetComponent <MainMenuMaster>(); }