Exemple #1
0
        public void PlaySound(AudioClip clip, bool loop = false)
        {
            AudioUnit audioUnit = AudioUnit.Allocate();

            audioUnit.SetAudio(gameObject, clip, loop, m_IsSoundEnable);
            audioUnit.SetVolume(m_SoundVolume);
        }
Exemple #2
0
 public void PlayBg(AudioClip clip, bool loop = true)
 {
     m_MainUnit.SetAudio(gameObject, clip, loop, m_IsMusicEnable);
     m_MainUnit.SetVolume(m_MusicVolume);
 }