void Awake() { //print ("the mixer behaviour has awaken!"); if(_instance == null){ _instance = this; #if UNITY_EDITOR if(Application.isEditor){ SoundManagerMainWindow.Launch(); _mainMixer = SoundManagerMainWindow.Window.mainMixer; _mainMixerGlobal = SoundManagerMainWindow.Window.mainMixerGlobal; if(_mainMixer == null) { print ("window not open"); MixerSerialize.LoadFromSceneName(_filename, ref _mainMixer); MixerSerialize.LoadFromSceneName(SoundMainMixer.mainMixerGlobalPath, ref _mainMixerGlobal); } } else #endif { MixerSerialize.LoadFromSceneName(_filename, ref _mainMixer); MixerSerialize.LoadFromSceneName(SoundMainMixer.mainMixerGlobalPath, ref _mainMixerGlobal); } #if UNITY_EDITOR SoundManagerMainWindow.CheckForRunningChange(); #endif } }
// Use this for initialization void Start() { _audioManager = MixerBehaviour.instance; if (_audioManager == null){ Debug.LogError("Couldn't find AudioManager!"); } else { requestMixer(); } //PlayTrigger.Play(_audioManager.mainMixer, "testing"); }