Conversation
Trigger dialogue or conversation events.
Introduction
Conversation shows dialogue on the player’s screen when it is triggered. The content is written as a script, so a conversation can also run other logic while it plays out. The Conversation component panel in the Uni editor Image The Conversation component panel in the Object editor. caption On characters and NPCs this component appears in the Add Component menu under the Gameplay category, beside Character Follower, Character Health, and Character Patrol. To attach Conversation to a character instead, follow the Character Conversation guide.
How to Access
Select an object, open the Properties Panel, then press the Add Component button at the bottom and pick Conversation. The component stacks onto the object as a new accordion of properties. Video
Another Way to Access
Shortcut: open the Asset Panel, go to the Device tab, Others category, and click the Conversation block. The editor spawns a cube with Conversation already attached, ready to adjust. How to Access - the Conversation block in Asset Panel > Device > Others
Properties
Trigger Mode Enum How the player sets the conversation off. Interact Text String The label on the interaction bubble. Content Script The dialogue itself, edited in the visual Dialog script editor: stack Display Dialog, Choose Dialog, and Run Script blocks (see the section below). Property Type Description Every property on the Conversation component.
The Dialog Script Editor
Selecting the object and clicking the Content property opens the Dialog script editor: a visual, block-based canvas where the whole conversation is built as a flow of blocks. The editor offers three block types, shown in the example below: Display Dialog - shows a chat bubble in the conversation: Display a dialog by [speaker] with the content: [text] . The speaker is a Text value (for example the NPC name) and the content is what the player reads. Choose Dialog - asks the player to pick an answer: When choose choice [text] . Every choice opens its own branch below it, so a single question can lead to different follow-up dialogs. The + button adds another choice, and the - button removes one. Run Script - runs a piece of Uni Script in the middle of the conversation, for rewards, quest flags, or effects that should happen when a line is said. Blocks snap together top to bottom in the order the conversation plays. A typical flow: start with a Display Dialog greeting, add a Choose Dialog with the answer options, and place a Display Dialog inside each choice branch. The example below is a two-line chat: Uni says "Hi, nice to meet you", the player picks "hello" (Uni answers "have a good day") or "goodbye" (Uni answers "see you next time"). A branching dialog in the Dialog script editor: a greeting followed by two choices, each with its own reply Image A simple branching conversation: a greeting from Uni, then two choices where each answer shows its own reply. caption
Events
Conversation has no events.
Commands
Conversation has no commands.
Example
A Character NPC having a conversation with a player. Conversation - Simple video