public void PlaySound(AudioClip clip, bool loop = false) { AudioUnit audioUnit = AudioUnit.Allocate(); audioUnit.SetAudio(gameObject, clip, loop, m_IsSoundEnable); audioUnit.SetVolume(m_SoundVolume); }
public void PlayBg(AudioClip clip, bool loop = true) { m_MainUnit.SetAudio(gameObject, clip, loop, m_IsMusicEnable); m_MainUnit.SetVolume(m_MusicVolume); }