AnimancerState.

IsPlaying Property

Summary

Is the Animancer.AnimancerState.Time automatically advancing?
Assembly
Animancer.dll
Namespace
Animancer
Containing Type
AnimancerState

Syntax

public bool IsPlaying { get; set; }

Remarks

This value doesn't automatically become false after an animation passes the end of its Animancer.AnimancerState.Length. The Animancer.AnimancerState.Time continues increasing unless something stops it, regardless of whether it Animancer.AnimancerState.IsLooping or not.

Example:
 void IsPlayingExample(AnimancerComponent animancer, AnimationClip clip)
 {
     var state = animancer.States.GetOrCreate(clip);

     if (state.IsPlaying)
         Debug.Log(clip + " is playing");
     else
         Debug.Log(clip + " is paused");

     state.IsPlaying = false;// Pause the animation.

     state.IsPlaying = true;// Unpause the animation.
 }

Value

Type Description
bool