---
title: JumpToTime(ref TimerState, DiscreteTime)
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/timerstateextensions/jumptotime
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/timerstateextensions/jumptotime.md
last_updated: 2026-11-30
generated_at: 2026-11-30T21:27:28.856Z
locale: en-us
---

# JumpToTime(ref TimerState, DiscreteTime)

> Jumps a timer state to a specific time, without advancing the timer from the current time to that time.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Animations](/engine/7000.0/script-reference/unity/animations.md)
* **Assembly:** [UnityEngine.AnimationCoreModule](/engine/7000.0/script-reference/modules/unityengine-animationcoremodule.md)

## JumpToTime(TimerState, DiscreteTime)

```csharp
public static void JumpToTime(this ref TimerState timerState, DiscreteTime time)
```

### Parameters

**** (\[TimerState]\(/engine/7000.0/script-reference/unity/animations/timerstate)): The timer state to jump. The method changes this timer state.**** (\[DiscreteTime]\(/engine/7000.0/script-reference/unity/integertime/discretetime)): The time to jump to, in the same unit as `TimerState.Range`. The wrap mode of the timer decides what happens to a time outside the range.

### Remarks

The jump doesn't count the skipped span as played: [TimerState.PreviousTime](/engine/7000.0/script-reference/unity/animations/timerstate/previoustime.md) and [TimerState.Time](/engine/7000.0/script-reference/unity/animations/timerstate/time.md) both become the target time, and [TimerState.DeltaTime](/engine/7000.0/script-reference/unity/animations/timerstate/deltatime.md) becomes zero. When the wrap mode is [WrapMode.Once](/engine/7000.0/script-reference/unityengine/wrapmode/once.md) or [WrapMode.ClampForever](/engine/7000.0/script-reference/unityengine/wrapmode/clampforever.md), the timer clamps the target time to [TimerState.Range](/engine/7000.0/script-reference/unity/animations/timerstate/range.md). When the wrap mode is [WrapMode.Loop](/engine/7000.0/script-reference/unityengine/wrapmode/loop.md) or [WrapMode.PingPong](/engine/7000.0/script-reference/unityengine/wrapmode/pingpong.md), the timer repeats or reflects the target time into the range. When the wrap mode is [WrapMode.Default](/engine/7000.0/script-reference/unityengine/wrapmode/default.md), the timer doesn't change the target time.

The time is a curve time, in the same unit as `Range`. When the wrap mode is `Loop`, the timer moves to `time` shifted by [TimerState.CycleOffset](/engine/7000.0/script-reference/unity/animations/timerstate/cycleoffset.md) times the duration of the range. Other wrap modes ignore the offset. For `Loop` and `PingPong`, the jump sets [TimerState.LoopCount](/engine/7000.0/script-reference/unity/animations/timerstate/loopcount.md) to [TimerState.PreviousLoopCount](/engine/7000.0/script-reference/unity/animations/timerstate/previousloopcount.md).

A jump also resets the timer for event gathering: if the timer advances in the next [TimerStateExtensions.Update](/engine/7000.0/script-reference/unity/animations/timerstateextensions/update.md), [AnimationEventUtility.GatherAnimationEvents](/engine/7000.0/script-reference/unity/animations/animationeventutility/gatheranimationevents.md) includes the animation events at the target time, once. The events between the old time and the target time aren't gathered.
