Skip to main content

Beat Playback Service

Description​

Handles the sequential presentation of beat groups within a dialogue node. When a node is entered, this service walks through its beat groups one at a time, presenting all beats in each group simultaneously and coordinating with the response and progression services.

It also plays connection beats -- the beat groups authored on a connection, which let the responder answer before the conversation moves to the target node. See Beats.

Interface​

Type
N/A

A plain sealed class with no interface. ChatSystemService and HeadlessConversationController each own one.

Inherits​

Type
N/A

Properties​

NameTypeDescription
IsPlayingConnectionBeatsboolTrue while a connection's beat groups are being played out.

Public Methods​

NameParametersReturn TypeDescription
BindIChatResponseService, IAgentPresentationService, IDialogueAgentService, AudioSourcevoidBinds the service to its dependencies for the current conversation.
BindIChatResponseService, IAgentPresentationService, IDialogueAgentService, AudioSource, Transform speakerTransform, IAgentService speaker = null, IAgentService listener = nullvoidAs above, plus the transform and agents needed for camera framing and token resolution.
BeginNodeChatData nodevoidStarts playback of a node's beat groups from the first group.
AdvanceBeatOrDisplayOptionsN/AvoidAdvances to the next beat group, or shows options if at the last.
PlayConnectionBeatsDialogueBeatGroupData[] beatGroups, IAgentPresentationService responderPresentation, IDialogueAgentService responderDialogueAgent, AudioSource responderAudio, Transform responderTransform, Action onCompletevoidPlays a connection's beat groups as the responder, then invokes onComplete. Invokes immediately if there are none.
StopConnectionBeatsN/AvoidCancels connection beat playback in progress.
StopN/AvoidStops playback, audio, and any pending progression.
ClearN/AvoidReleases the bound dependencies so the service can be re-bound.