PlaybackMode Enum
Controls how an AnimationClip loops.
public enum PlaybackMode
Fields¶
OnceHoldLast 0
The clip plays once, freezes on the last frame, and sets
IsFinished to true. Symmetric counterpart to
OnceHoldFirst; identical in behaviour to Once but expresses
the intent of holding the last frame more clearly.
When Reversed is true, completion freezes on the
\<em>first\</em> frame (index 0), because that is the logical "last" frame of a reversed pass.
OnceHoldFirst 1
The clip plays once and freezes on the first frame after completion.
When Reversed is true, playback runs from the last
frame to the first; completion freezes on the \<em>last\</em> frame (index Count − 1),
because that is the logical "first" frame of a reversed pass.
OnceStop 2
The clip plays once and then clears the current frame entirely on completion, making
CurrentFrame return null. Useful for VFX clips that
should disappear rather than freeze on the last frame.
OnAnimationComplete fires, then
OnStopped fires (unless a queued animation takes over).
Loop 3
The clip loops indefinitely, jumping back to the first frame after the last.
PingPong 4
The clip plays forward to the end then backward to the start, repeating indefinitely.
PingPongOnce 5
The clip plays one full cycle (forward then backward, or backward then forward when
Reversed is true), then stops on the first frame of
the final pass. OnAnimationComplete fires at the end of the
second pass. Queued animations and the state machine default state trigger normally.