playMaker

Author Topic: Script problem in Unity 5 [SOLVED]  (Read 1817 times)

lh2009

  • Playmaker Newbie
  • *
  • Posts: 12
Script problem in Unity 5 [SOLVED]
« on: March 03, 2015, 06:56:10 PM »
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();
   }


}
« Last Edit: March 03, 2015, 10:27:34 PM by Alex Chouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4003
  • Official Playmaker Support
    • LinkedIn
Re: Script problem in Unity 5
« Reply #1 on: March 03, 2015, 07:02:08 PM »
This problem actually started with Unity 4.5 which included its own Tooltip attribute.

Check out this thread for the fix:
http://hutonggames.com/playmakerforum/index.php?topic=7454.0

lh2009

  • Playmaker Newbie
  • *
  • Posts: 12
Re: Script problem in Unity 5
« Reply #2 on: March 03, 2015, 07:07:44 PM »
Brilliant Thanks!