I downloaded this audio listener pause script off this forum a while back and it worked as it should.
Since upgrading to Unity 5 I have received this error:
Assets/Scripts/AudiolistenerPause.cs(5,2): error CS0246: The type or namespace name `Tooltip' could not be found. Are you missing a using directive or an assembly reference?
Anyone have any idea what needs to be changed in the code? thanks
Code:
using UnityEngine;
using HutongGames.PlayMaker;
[ActionCategory(ActionCategory.Audio)]
[Tooltip("Pauses the Audio Listener component on a Game Object.")]
public class AudiolistenerPause : FsmStateAction
{
[RequiredField]
[Tooltip("Pause listener")]
public FsmBool pauseListener;
public override void Reset()
{
pauseListener = false;
}
// Code that runs on entering the state.
public override void OnEnter()
{
AudioListener.pause = pauseListener.Value;
Finish();
}
}