public void PlayAudioClip(AudioClip clip, AudioConfigurationSO setting, Vector3 position = default) { Debug.LogError("SoundEmitter Play"); m_AudioSource.clip = clip; setting.ApplyTo(m_AudioSource); m_AudioSource.transform.position = position; m_AudioSource.Play(); }
public void PlayAudioCue(AudioCueSO audioCue, AudioConfigurationSO setting, Vector3 position = default) { AudioClip[] clipsToPlay = audioCue.GetClips(); SoundEmitter[] soundEmitterArray = new SoundEmitter[clipsToPlay.Length]; for (int i = 0; i < clipsToPlay.Length; i++) { soundEmitterArray[i] = GameObjectPoolMgr.S.Allocate(POOL_NAME).GetComponent <SoundEmitter>(); if (soundEmitterArray[i] != null) { soundEmitterArray[i].PlayAudioClip(clipsToPlay[i], setting, position); } } }