TimerState
Data used to represent the current state of an animation timer.
Read time 1 minuteLast updated 3 hours ago
Definition
- Type: Struct
- Namespace: Unity.Animations
- Assembly: UnityEngine.AnimationCoreModule
public struct TimerState
Fields
Value | Description |
|---|---|
| CycleOffset | The point of the cycle where the timer starts, as a fraction of TimerState.Range duration. |
| Range | Determines what is the valid time range. |
| TimeScale | The time scale of the timer. |
| WrapMode | How the timer treats time outside of its range. |
Properties
Property | Description |
|---|---|
| DeltaTime | The delta time this frame. |
| IsPlaying | Whether the timer advances on the next TimerStateExtensions.Update. |
| LoopCount | The number of times this has been looped in total until the current frame (included) |
| NextPlayState | The play state that the timer takes on the next update. |
| PlayState | The play state for the current frame. |
| PreviousLoopCount | The number of times this has been looped in total until the previous frame (included) |
| PreviousPlayState | The play state on the previous frame. |
| PreviousTime | The time on the previous frame. |
| Time | The time this frame. |
Static Methods
Method | Description |
|---|---|
| Create | Creates a playing timer at the start of a range. |