Summary
Sets the
Animancer.AnimancerState.Time
of the Animancer.AnimancerEvent.CurrentState
to 0.- Assembly
- Animancer
.dll - Namespace
- Animancer
.Examples .Events - Containing Type
- EventUtilities
Syntax
public static readonly Action RestartCurrentState
Examples
Play a non-looping animation but force it to loop:
[SerializeField] private AnimancerComponent _Animancer;
[SerializeField] private AnimationClip _NonLoopingClip;
private void Awake()
{
var state = _Animancer.Play(_NonLoopingClip);
state.Events.OnEnd = EventUtilities.RestartCurrentState;
}