AnimancerState.

RemainingDuration Property

Summary

The number of seconds the animation will take to reach the end at its current Animancer.AnimancerNode.Speed.

For the time it would take to play fully from the start, use Animancer.AnimancerState.Duration instead.

Setting this value modifies the Animancer.AnimancerNode.Speed, not the Animancer.AnimancerState.Length.

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

Syntax

public float RemainingDuration { get; set; }

Examples

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

     state.RemainingDuration = 1;// Play from the current time to the end in 1 second.
     state.RemainingDuration = 2;// Play from the current time to the end in 2 seconds.
     state.RemainingDuration = 0.5f;// Play from the current time to the end in half a second.
     state.RemainingDuration = -1;// Play backwards from the current time to the end in 1 second.
 }

Value

Type Description
float