private void Awake() { menuButtonController = GetComponentInParent <MenuButtonController>(); animator = GetComponent <Animator>(); soundManager = GetComponentInParent <MainMenuSoundManager>(); canPlay = false; }
// Use this for initialization void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
void Awake() { getSoundsFromResources(); instance = this; }