x


Check if a spesific animation is playing

I know that Animation.IsPlaying allows me to check if any animation is playing, but how can i check if a specific animation is playing?

more ▼

asked Apr 07 '10 at 01:52 PM

Mattivc gravatar image

Mattivc
1.7k 55 60 67

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Check the enabled property of the desired animation:

if (animation["funnywalk"].enabled == true)
    print("funnywalk is playing.");
more ▼

answered Apr 07 '10 at 02:37 PM

Cyclops gravatar image

Cyclops
7.1k 33 63 115

This does work indeed, whereas animation.IsPlaying("funnywalk") might wrongfully return true from time to time (it seems). Any idea why?

Sep 21 '10 at 08:26 PM Ben 14
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3790
x108

asked: Apr 07 '10 at 01:52 PM

Seen: 5707 times

Last Updated: Apr 07 '10 at 01:52 PM