public void Awake() { unitAudioSourceHelper = GetParent <Unit>().GameObject.GetComponentInChildren <UnitAudioSourceHelper>(); AudioPlayerMgr audioPlayerMgr = Game.Scene.GetComponent <AudioMgrComponent>().audioPlayerMgr; if (unitAudioSourceHelper.attackAS != null) { unitAudioSourceHelper.attackAS.outputAudioMixerGroup = audioPlayerMgr.soundEffect; } if (unitAudioSourceHelper.envirAS != null) { unitAudioSourceHelper.envirAS.outputAudioMixerGroup = audioPlayerMgr.soundEffect; } if (unitAudioSourceHelper.emoteAS != null) { unitAudioSourceHelper.emoteAS.outputAudioMixerGroup = audioPlayerMgr.characterSound; } if (unitAudioSourceHelper.moveAS != null) { unitAudioSourceHelper.moveAS.outputAudioMixerGroup = audioPlayerMgr.characterSound; } }
public void Awake(AudioPlayerMgr audioPlayerMgr) { this.audioPlayerMgr = audioPlayerMgr; }