Dialogue UI

Full API reference for all dialogue UI components — screen-space and world-space dialogue display, selection menus, typewriter text reveal, and babble audio.

The Dialogue UI layer handles all player-facing presentation of dialogue content. It is completely decoupled from the sequencer through the DialogueUIBridgeComponent – the sequencer never talks to a UI component directly. This page documents the seven components that make up the built-in UI system.

ComponentPurpose
DialogueUIComponentScreen-space dialogue text display.
WorldDialogueUIComponentWorld-space speech bubble display.
DialogueUISelectionComponentScreen-space player choice display.
WorldDialogueUISelectionComponentWorld-space player choice display.
DialogueSelectButtonComponentIndividual selection button within a choice menu.
TypewriterComponentCharacter-by-character text reveal.
BabbleComponentProcedural audio babble synchronized to text reveal.

For usage guides and setup examples, see The Basics: GS_Cinematics.

 

Contents


DialogueUIComponent

The standard screen-space dialogue display. Receives dialogue payloads from the UI Bridge and renders speaker name, portrait, and text lines using LyShine UI canvases.

Request Bus: DialogueUIRequestBus

MethodParametersReturnsDescription
DoDialogueconst DialogueTextPayload& payloadvoidProcesses a full dialogue payload: sets speaker name, portrait, and begins text display through the typewriter.
ShowDialoguevoidMakes the dialogue UI canvas visible.
HideDialoguevoidHides the dialogue UI canvas without destroying it.
CloseUIvoidFully closes and cleans up the dialogue UI.
GetTypewriterAZ::EntityIdReturns the entity that holds the TypewriterComponent used by this UI.

DialogueUIComponent canvas in the O3DE UI Editor


WorldDialogueUIComponent

Extends DialogueUIComponent for world-space rendering. Displays speech bubbles attached to performer entities in 3D space. Shares the same DialogueUIRequestBus interface as the base class. The world-space variant tracks the performer entity’s position and orients the UI element toward the camera.

Use WorldDialogueUIComponent when you want dialogue to appear as in-world speech bubbles rather than as a screen overlay.

WorldDialogueUIComponent canvas in the O3DE UI Editor


DialogueUISelectionComponent

Screen-space player choice display. Builds a list of selectable options from a DialogueSelectionPayload, spawns DialogueSelectButtonComponent instances for each valid option, and waits for the player to pick one.

Request Bus: DialogueUISelectionRequestBus

MethodParametersReturnsDescription
DoSelectionconst DialogueSelectionPayload& payloadvoidBuilds and displays the selection menu from the provided options.
OnSelectionint selectedIndexvoidCalled when a button is pressed. Processes the selection and notifies the bridge.
ShowSelectionvoidMakes the selection UI canvas visible.
ClearSelectionvoidRemoves all spawned option buttons and resets the selection state.
CloseUIvoidFully closes and cleans up the selection UI.

DialogueUISelectionComponent canvas in the O3DE UI Editor


WorldDialogueUISelectionComponent

Extends DialogueUISelectionComponent for world-space rendering. Displays selection options as in-world UI elements attached to performer entities. Shares the same DialogueUISelectionRequestBus interface as the base class.

WorldDialogueUISelectionComponent canvas in the O3DE UI Editor


DialogueSelectButtonComponent

An individual button within a selection menu. One instance is spawned per valid option. The button displays option text and forwards press events to the parent selection component.

Event Bus: DialogueUISelectionEventBus

MethodParametersReturnsDescription
SetupOptionconst SelectionOption& option, int indexvoidConfigures the button with display text and its index in the selection list.
GetInteractableEntityAZ::EntityIdReturns the LyShine interactable entity used for input detection.

DialogueSelectButtonComponent in the O3DE Inspector


TypewriterComponent

Character-by-character text reveal system. The typewriter receives a full text string and reveals it one character at a time at a configurable speed. It fires events on each character reveal and when the full text has been displayed. The typewriter is used internally by DialogueUIComponent but can also be used independently for any text reveal effect.

For detailed usage and standalone setup, see the Typewriter sub-page.

Request Bus: TypewriterRequestBus

MethodParametersReturnsDescription
StartTypewriterconst AZStd::string& text, float speedvoidBegins revealing the given text at the specified characters-per-second speed.
ForceCompletevoidImmediately reveals all remaining text. Fires OnTypewriterComplete.
ClearTypewritervoidClears all displayed text and resets the typewriter state.

Notification Bus: TypewriterNotificationBus

Multiple handler bus.

EventParametersDescription
OnTypeFiredchar characterFired each time a character is revealed. Used by the BabbleComponent to synchronize audio.
OnTypewriterCompleteFired when all characters have been revealed, either naturally or via ForceComplete.

BabbleComponent

Procedural audio babble that plays in sync with the typewriter. Each character reveal from OnTypeFired can trigger a short audio event, creating a character-by-character speech sound. Different speakers can have different babble tones.

Request Bus: BabbleRequestBus

MethodParametersReturnsDescription
GetBabbleEventconst AZStd::string& speakerNameBabbleToneEventReturns the babble audio event associated with the given speaker.

Data Types

TypeDescription
BabbleToneEventA single audio event reference (FMOD or Wwise event) that represents one character’s babble sound.
SpeakerBabbleEventsA mapping of speaker names to BabbleToneEvent instances. Stored on the BabbleComponent and queried at runtime.

Setup Guide

Screen-Space Dialogue

  1. Create a UI canvas entity with your dialogue layout (speaker name text, portrait image, dialogue text area).
  2. Attach a DialogueUIComponent to the entity.
  3. Attach a TypewriterComponent to the text entity (or the same entity).
  4. Optionally attach a BabbleComponent and configure speaker babble events.
  5. Attach a DialogueUISelectionComponent to a separate entity (or the same canvas) for player choices.
  6. Register the UI entity with DialogueUIBridgeRequestBus::RegisterDialogueUI(uiEntityId).

World-Space Dialogue

  1. Follow the same steps as screen-space, but use WorldDialogueUIComponent and WorldDialogueUISelectionComponent instead.
  2. The world-space components will track the performer entity’s position automatically.
  3. Register the UI entity with the bridge the same way.

Swapping between screen-space and world-space at runtime requires only changing which UI entity is registered with the bridge. No sequencer or dialogue data changes are needed.


See Also

For conceptual overviews and usage guides:

For component references:

For related resources:


Get GS_Cinematics

GS_Cinematics — Explore this gem on the product page and add it to your project.