Skip to main content

Overhead Text Service

Description

Renders floating world-space text above a speaking agent. It is what makes agent-to-agent conversations legible without a dialogue panel, and it can optionally run alongside the panel for player conversations too.

It also shows Civil AI barks when CIVIL-AI-SYSTEM is installed, so ambient lines and conversation lines look the same. One view is created per anchor transform and reused, so an agent that speaks repeatedly does not accumulate objects. See Agent-to-Agent Conversations and the overhead text settings in Module Settings.

IOverheadDialogueTextService

NameParametersReturn TypeDescription
ShowTextTransform anchor, string textvoidPositions a bubble above the anchor and shows the text.
HideTransform anchorvoidHides that anchor's bubble.
HideAllN/AvoidHides every bubble.

Hiding does not destroy the view; it is reused the next time the same anchor speaks.

OverheadDialogueTextService

The default implementation. What you can rely on when using it:

  • The prefab is optional. Leave World Text Prefab unset and a plain text-and-background view is provided for you. Assign a prefab when you want your own look.
  • Bubbles follow the speaker. A bubble tracks its anchor every frame while it's showing, so it stays above an agent that keeps walking mid-line.
  • Settings take effect on the next line. Changing font, colour, or background in module settings does not need a restart.
  • Typewriter speed is shared with the dialogue panel. There is no separate overhead reading pace. Turning the typewriter off, or unticking Apply To Overhead Text, shows lines instantly.

NoOpOverheadDialogueTextService

A do-nothing stand-in, registered in place of the real service when TextMeshPro's runtime settings are absent.

If overhead text works in the editor but silently does nothing in a build, this is the first thing to check.