SeekMessage
A built-in message that moves the playback position of a generator.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Struct
- Namespace: UnityEngine.Audio
- Assembly: UnityEngine.AudioModule
public struct SeekMessage
Remarks
Send a to a generator with ControlContext.SendMessage. A generator supports seeking only if it handles this message. An AudioClip used as a generator handles SeekMessage out of the box, including within nested generator hierarchies; a custom generator opts in through its control part's ProcessorInstance.IControl<TRealtime>.OnMessage method.
SeekMessage_destination is the position to jump to and _when is the position at which the seek takes effect. A null _when seeks immediately. Send seeks in any order: an AudioClip generator applies them in send order, and drops a seek whose _when 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; follow the same rules where they apply so seeks behave consistently across generator types.
Additional Resources: ControlContext.SendMessage, AudioClip
Constructors
Constructor | Description |
|---|---|
| SeekMessage(Unity.IntegerTime.DiscreteTime,System.Nullable{Unity.IntegerTime.DiscreteTime}) | Creates a seek request. |
Properties
Property | Description |
|---|---|
| destination | Content position to jump to. |
| when | Content position at which the seek takes effect. Null applies the seek immediately. |