AnimancerState.

RemainingDuration Property

Summary

The number of seconds this state will take to go from its current Animancer.AnimancerState.NormalizedTime to the Animancer.AnimancerState.NormalizedEndTime at its current Animancer.AnimancerNodeBase.EffectiveSpeed.
Assembly
Animancer.dll
Namespace
Animancer
Containing Type
AnimancerState

Syntax

public float RemainingDuration { get; set; }

Remarks

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

Setting this value modifies the Animancer.AnimancerNodeBase.EffectiveSpeed, not the Animancer.AnimancerState.Length.

Animancer Lite doesn't allow this value to be changed in runtime builds.

Example:
 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 from the current time away from the end.
 }

Value

Type Description
float