private void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else if (instance != this) { //Destroy(gameObject); } }
/// <summary> /// To Do: Place audio visualizer in the right place in the architecture. /// </summary> /// <param name=""></param> /// <param name="Start"></param> /// <returns></returns> void Start() { checkPan = this.transform.localScale.x / 10.0f; audioController = GameObject.Find("PlayerAudio").GetComponentInChildren<AudioControllerV2>(); }
void Awake() { audioController = GameObject.Find("PlayerAudio").GetComponentInChildren<AudioControllerV2>(); }