Documentation

Unity Engine

Download Unity

Unity Engine

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

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
Time
already includes it. When
Rewind
applies a negative offset, the time wraps backward and TimerState.LoopCount is
-1
or less.
The default value is 0, which leaves a timer unchanged. Clip.ToTimerState takes the offset from the clip.