Dialogue Speaker
Overview
DialogueSpeaker is a ScriptableObject that defines everything the dialogue system needs to know about a character: their display name, portrait, name and text colours, optional voice audio, typewriter speed override, and an optional Cinemachine virtual camera to activate when they speak.
Each SimpleDialogueNode and ChoiceDialogueNode holds a reference to one DialogueSpeaker asset. When the dialogue UI displays a line it reads from that asset to populate the name label, portrait image, text colour, and text speed — and optionally activates the speaker's Cinemachine camera.
Create via: Assets → Create → Malbers Quest Forge → Dialogue → Speaker
Can also be created inline from any node that accepts a Speaker field using the + button beside the Speaker field in the graph editor.

Properties
Speaker Identity
Speaker Name
String
"Character"
The display name shown in the dialogue UI name label. A warning is shown in the Inspector if this is left empty.
Portrait
Sprite
None
The avatar or bust image displayed in the dialogue UI alongside the name. Optional.
Name Color
Color
White
Tint applied to the name label text in the dialogue UI.
Audio Settings
Voice Clip
AudioClip
None
Audio clip played when this speaker delivers a line. Optional — dialogue is silent if unassigned.
Voice Pitch
Float (0.8 – 1.2)
1.0
Pitch multiplier applied when the voice clip is played. Use values below 1.0 for deeper voices, above 1.0 for higher voices.
Text Settings
Text Color
Color
White
Tint applied to the dialogue body text when this speaker is active.
Custom Text Speed
Float (0 – 100)
0
Typewriter characters-per-second override for this speaker. Set to 0 to fall back to the DialogueManager's global text speed.
Camera Settings
Both fields use Malbers reference types (TransformReference / GameObjectReference), which each support either a direct inline object assignment or a linked ScriptableObject variable (TransformVar / GameObjectVar).
Camera Target
TransformReference
A Transform the gameplay camera can be directed to focus on when this speaker is active. Used by the FocusOnSpeaker action in CinemachineDialogueNode.
Cinemachine Camera
GameObjectReference
A Cinemachine Virtual Camera GameObject to activate when this speaker talks. This is the camera targeted by the Focus Camera on Speaker toggle on SimpleDialogueNode and ChoiceDialogueNode.
Priority: If both are assigned,
cinemachineCameratakes precedence for camera activation.cameraTargetis only used when no Cinemachine camera is configured.
Public API
GetTextSpeed(float defaultSpeed)
float
Returns customTextSpeed if it is greater than 0; otherwise returns defaultSpeed. Called by the DialogueManager when displaying a line to determine the active typewriter rate.
HasCustomCamera()
bool
Returns true if cinemachineCamera.Value is not null. Used by nodes to decide whether to activate a speaker camera.
Inspector Preview
The Inspector's Speaker Preview panel renders a live representation of how the speaker will appear in the dialogue UI:
Name — drawn in bold using
nameColor.Portrait — displayed at 64 × 64 pixels if assigned.
Sample text —
"This is how my dialogue text will appear in-game."drawn intextColorwith word wrap.
The preview updates immediately as you change name, colours, or portrait, without entering Play Mode.
How Nodes Use a DialogueSpeaker
When a SimpleDialogueNode or ChoiceDialogueNode is processed at runtime:
Name label — set to
speakerName, coloured withnameColor.Portrait — set to
portraitif assigned; portrait panel hidden if null.Dialogue text — coloured with
textColor; typewriter speed resolved viaGetTextSpeed(defaultSpeed).Voice —
voiceClipplayed atvoicePitchif assigned.Camera — if Focus Camera on Speaker is enabled on the node and
HasCustomCamera()returnstrue, the camera oncinemachineCamerais activated (priority raised) for the duration of that node.
Usage Tips
One asset per character — a single DialogueSpeaker is shared across every node in every dialogue graph that features that character. Changing the name or portrait in one place updates all uses automatically.
Inline creation — the + button on any Speaker field in the graph editor creates and saves a new asset to the project without leaving the graph editor window.
Colour-coded cast — assigning a distinct
nameColorper character (e.g. cyan for the player, gold for the quest giver) gives players an instant visual cue about who is speaking even before reading the name label.Per-character typewriter speed — set a faster
customTextSpeedfor excitable or quick-talking characters and a slower one for slow, deliberate speakers, without touching the DialogueManager's global setting.Shared vs. instanced cameras — assign the Cinemachine camera as a
GameObjectReferenceusing a direct constant value for a dedicated NPC camera, or use aGameObjectVarif the same speaker asset is used across multiple scenes where the camera reference differs.Voiceless speakers — leaving
voiceClipblank is perfectly valid. The Inspector will note "dialogue will be silent" but raises no error, so narrators or text-only characters need no special setup.
Last updated