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

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.AnimancerNode.EffectiveSpeed, not the Animancer.AnimancerState.Length.

Animancer Lite does not allow this value to be changed in runtime builds.

Value

Type Description
float