Ejemplo n.º 1
0
    public void ActivateAudio()
    {
        //  var unityAudioProcessorComponent = gameObject.AddComponent<UnityAudioProcessorComponent>();
        UnityAudioProcessorComponent unityAudio = GetComponent <UnityAudioProcessorComponent>();

        if (unityAudio == null && useUnityAudio)
        {
            unityAudio = gameObject.AddComponent <UnityAudioProcessorComponent>();
        }

        if (unityAudio != null)
        {
            Wrapper?.ActivateAudio(unityAudio);
        }
        else
        {
            Wrapper?.ActivateAudio(new NAudioAudioProcessor());
        }
    }