void Start() { audioManager = ASAudioManager.ins; if (audioManager == null) { Debug.LogError("ASAudioPlayer: No audio manager found!"); } }
void Awake() { if (_ins == null) { // Populate with first instance _ins = this; DontDestroyOnLoad(this); } else { // Another instance exists, destroy if (this != _ins) Destroy(this.gameObject); } }
void Awake() { if (_ins == null) { // Populate with first instance _ins = this; DontDestroyOnLoad(this); } else { // Another instance exists, destroy if (this != _ins) { Destroy(this.gameObject); } } }
void Start() { // Caching userDatamanager = UserDataManager.ins; if (userDatamanager == null) { Debug.LogError("No UserDataManager?!"); } applicationManager = ApplicationManager.ins; if (applicationManager == null) { Debug.LogError("No ApplicationManager?!"); } courseManager = CourseManager.ins; if (courseManager == null) { Debug.LogError("No CourseManager?!"); } modalPanel = ModalPanel.ins; if (modalPanel == null) { Debug.LogError("No ModalPanel?!"); } courseCompletedOKEvent = new UnityAction(_CourseCompleted); courseViewCompletedOKEvent = new UnityAction(_CourseViewContinue); courseViewCompletedCancelEvent = new UnityAction(_CourseViewStay); audioManager = ASAudioManager.ins; if (audioManager == null) { Debug.LogError("No ASAudioManager?!"); } }