Create(DiscreteTimeInterval, WrapMode, float)
Creates a playing timer at the start of a range.
Read time 1 minuteLast updated 4 hours ago
Definition
- Type: Method
- Namespace: Unity.Animations
- Assembly: UnityEngine.AnimationCoreModule
public static TimerState Create(DiscreteTimeInterval range, WrapMode wrapMode, float cycleOffset = 0)
Parameters
The time range of the timer.
How the timer treats time outside of .
rangeThe point of the cycle where the timer starts, as a fraction of the duration of . Only WrapMode.Loop uses it.
rangeReturns
Type | Description |
|---|---|
| TimerState | The new timer. |
Remarks
The timer has a TimerState.TimeScale of 1, and is rewound with TimerStateExtensions.Rewind, so the cycle offset applies when the wrap mode is WrapMode.Loop. The first TimerStateExtensions.Update advances it. To create the timer of a clip, use Clip.ToTimerState.