Animation.isPlaying Manual     Reference     Scripting  
Scripting > Runtime Classes > Animation
Animation.isPlaying

var isPlaying : bool

Description

Are we playing any animations?

// Plays an animation only if we are not playing it already.
function OnMouseEnter() {
if (!animation.isPlaying)
animation.Play();
}