# SeekMessage

> A built-in message that moves the playback position of a generator.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.Audio](/engine/6000.7/script-reference/unityengine/audio.md)
* **Assembly:** UnityEngine.AudioModule

```csharp
public struct SeekMessage
```

## Remarks

Send a `SeekMessage` to a generator with [ControlContext.SendMessage](/engine/6000.7/script-reference/unityengine/audio/controlcontext/sendmessage.md). A generator supports seeking only if it handles this message. An [AudioClip](/engine/6000.7/script-reference/unityengine/audioclip.md) used as a generator handles [SeekMessage](/engine/6000.7/script-reference/unityengine/audio/seekmessage.md) out of the box, including within nested generator hierarchies; a custom generator opts in through its control part's [ProcessorInstance.IControl\<TRealtime>.OnMessage](/engine/6000.7/script-reference/unityengine/audio/processorinstance/icontrol1/onmessage.md) method.

[\_destination](/engine/6000.7/script-reference/unityengine/audio/seekmessage/destination.md) is the position to jump to and [\_when](/engine/6000.7/script-reference/unityengine/audio/seekmessage/when.md) is the position at which the seek takes effect. A null [\_when](/engine/6000.7/script-reference/unityengine/audio/seekmessage/when.md) seeks immediately. Send seeks in any order: an [AudioClip](/engine/6000.7/script-reference/unityengine/audioclip.md) generator applies them in send order, and drops a seek whose [\_when](/engine/6000.7/script-reference/unityengine/audio/seekmessage/when.md) position playback has already passed when that seek becomes the next one due. A custom generator defines its own seek handling in [ProcessorInstance.IControl\<TRealtime>.OnMessage](/engine/6000.7/script-reference/unityengine/audio/processorinstance/icontrol1/onmessage.md); follow the same rules where they apply so seeks behave consistently across generator types.

Additional Resources: [ControlContext.SendMessage](/engine/6000.7/script-reference/unityengine/audio/controlcontext/sendmessage.md), [AudioClip](/engine/6000.7/script-reference/unityengine/audioclip.md)

## Constructors

| Constructor                                                                                                                                                           | Description             |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
| [SeekMessage(Unity.IntegerTime.DiscreteTime,System.Nullable\{Unity.IntegerTime.DiscreteTime})](/engine/6000.7/script-reference/unityengine/audio/seekmessage/ctor.md) | Creates a seek request. |

## Properties

| Property                                                                                    | Description                                                                         |
| ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [destination](/engine/6000.7/script-reference/unityengine/audio/seekmessage/destination.md) | Content position to jump to.                                                        |
| [when](/engine/6000.7/script-reference/unityengine/audio/seekmessage/when.md)               | Content position at which the seek takes effect. Null applies the seek immediately. |
