- Home /
How to check if an object is playing ANY animation
I want to know if there is a way I can check whether any animation is playing, rather than a specific one.
So, I know for a specific I can use something like:
if (MainCamera_obj.animation.IsPlaying(AnimationClip.name) &&
(MainCamera_obj.animation[AnimationClip.name].normalizedTime < 1.0) )
But how would I check if the MainCamera above is playing ANY animations, is this even possible? A way to check if the animation component is being used maybe.
Thanks
Answer by Doireth · Jan 17, 2013 at 05:46 PM
Oops, the lowercase 'isPlaying' seemed to have somehow slipped me by :/
Thanks
Your answer
Follow this Question
Related Questions
How to check if a specific animation is playing within mecanim 2 Answers
Check if multiple gameObjects play animation 2 Answers
Detecting slope angle 1 Answer
Animation plays without a bool, but after adding it just goes still 0 Answers
Animation stops playing after disabling and enabling game object 1 Answer