コード例 #1
0
ファイル: SoundManage.cs プロジェクト: PenpenLi/Hifior
    public void Play3DEffect(GameObject obj, int index)//在某物体上播放3D音频
    {
        if (index > effects.Length)
        {
            return;
        }
        AudioSource asource = MiscUtil.GetComponentNotNull <AudioSource>(obj);

        asource.outputAudioMixerGroup = _3DEffectGroup;
        asource.PlayOneShot(effects[index]);
    }