.IsPlaying does not exist?
I'm having trouble with .IsPlaying for c#. I looked at the scripting reference for animation and isPlaying and IsPlaying is in there. When I used it in my script, it was acting like it was unknown or didn't exist in any way! I get this error: "error CS1061: Type UnityEngine.Animator' does not contain a definition for
IsPlaying' and no extension method IsPlaying' of type
UnityEngine.Animator' could be found."
Here's an example: if(anim.IsPlaying("animation")){ print("animation is playing"); }
Yes, I've set a variable for the animator, and yes, I've typed it in correctly.
This has to be a bug if it exists but thinks it's an error.
Answer by Jessespike · May 17, 2016 at 06:54 PM
UnityEngine.Animator' does not contain a definition for IsPlaying' and no extension method IsPlaying' of type UnityEngine.Animator' could be found."
This is not a bug, and the error isn't lying. Animator does not have a definition for IsPlaying. Perhaps you meant to use Animation?
Your answer
Follow this Question
Related Questions
How to fix "no overload for method get component takes 1 arguments" 1 Answer
Trying to get animation to work. Problem with JS. 1 Answer
Setup an animation script, but now mouselook is not working? 0 Answers
The name animator does not exist in the current context... Help? 1 Answer
Door control coordinates being a jerk 0 Answers