Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SeekMessage

A built-in message that moves the playback position of a generator.
Read time 1 minuteLast updated 6 days ago

Definition

public struct SeekMessage

Remarks

Send a
SeekMessage
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.
_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

Properties

Property

Description

destinationContent position to jump to.
whenContent position at which the seek takes effect. Null applies the seek immediately.