CycleOffset
The point of the cycle where the timer starts, as a fraction of TimerState.Range duration.
Read time 1 minuteLast updated 4 hours ago
Definition
- Type: Field
- Namespace: Unity.Animations
- Assembly: UnityEngine.AnimationCoreModule
public float CycleOffset
Remarks
The offset has the same unit as Cycle Offset in the clip settings. It applies only to a timer whose TimerState.WrapMode is WrapMode.Loop. Other wrap modes ignore the offset.
Only the methods that move the timer apply the offset. TimerStateExtensions.Rewind and TimerStateExtensions.JumpToTime add the offset, multiplied by the duration of TimerState.Range, to the time that they set. Updating the timer doesn't add the offset again, because already includes it. When applies a negative offset, the time wraps backward and TimerState.LoopCount is or less.
TimeRewind-1The default value is 0, which leaves a timer unchanged. Clip.ToTimerState takes the offset from the clip.