Exemplo n.º 1
0
    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]);
    }