AnimancerState.

Time Property

Summary

The number of seconds that have passed since the start of this animation.
Assembly
Animancer.dll
Namespace
Animancer
Containing Type
AnimancerState

Syntax

public float Time { get; set; }

Examples

 void PlayAnimation(AnimancerComponent animancer, AnimationClip clip)
 {
     var state = animancer.Play(clip);

     // Skip 0.5 seconds into the animation:
     state.Time = 0.5f;

     // Skip 50% of the way through the animation (0.5 in a range of 0 to 1):
     state.NormalizedTime = 0.5f;

     // Skip to the end of the animation and play backwards.
     state.NormalizedTime = 1;
     state.Speed = -1;
 }

Remarks

This value will continue increasing after the animation passes the end of its Animancer.AnimancerState.Length while the animated object either freezes in place or starts again from the beginning according to whether it is looping or not.

This property internally uses Animancer.AnimancerState.RawTime whenever the value is out of date or gets changed.

Animancer Lite does not allow this value to be changed in runtime builds (except resetting it to 0).

Value

Type Description
float