Skip to main content

Class TypewriterSequencer

Drives Aarthificial Typewriter dialogue clips during driving scenarios, dispatching each incoming entry to the correct TypewriterActor responder and logging the event sequence for post-hoc study analysis.

public class TypewriterSequencer : MonoBehaviour, IDataLoggable

Inheritance​

Implements​

IDataLoggable

Remarks​

The sequencer is the single integration point between the Typewriter database (rule evaluation) and the HRIDS actor hierarchy. Centralising dispatch here means dialogue trees can be authored entirely in the Typewriter editor without any MonoBehaviour code in individual actor scripts.

When _allowMultiEntryPlaying is off, entries queue strictly in arrival order — the Update loop breaks after the first active clip so a new RuleEntry is not dispatched until the current clip signals ReadyToRelease, preventing two characters from speaking at once. When enabled, every clip in the internal list is processed each frame, allowing parallel speech from multiple actors.

Place a single instance on a scene-manager GameObject. The component subscribes to TypewriterDatabase in OnEnable and unsubscribes in OnDisable, so enabling or disabling the object gates the entire dialogue system. Because TypewriterSequencer implements IDataLoggable, adding a DataCollector to the same or ancestor GameObject causes every entry invocation to be logged automatically.

Methods​

Collect()​

Collects and returns logged data for export, clearing the internal log buffer.

public DataLog Collect()

Returns​

DataLog — A DataLog containing the recorded logs, or null if no logs exist.