AnimancerState.

NormalizedTime Property

Summary

The Animancer.AnimancerState.Time of this state as a portion of the animation's Animancer.AnimancerState.Length, meaning the value goes from 0 to 1 as it plays from start to end, regardless of how long that actually takes.

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.

The fractional part of the value (NormalizedTime % 1) is the percentage (0-1) of progress in the current loop while the integer part ((int)NormalizedTime) is the number of times the animation has been looped.

Animancer Lite does not allow this value to be changed to a value other than 0 in runtime builds.
Assembly
Animancer.dll
Namespace
Animancer
Containing Type
AnimancerState

Syntax

public float NormalizedTime { 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;
 }

Value

Type Description
float