This chapter describes how to set up the Dialogue Manager GameObject in your scenes.
The Dialogue Manager coordinates runtime activity and maintains the Lua environment that contains the Dialogue System's runtime data. To add the Dialogue Manager, drag the prefab Assets ► Plugins ► Pixel Crushers ► Dialogue System ► Prefabs ► Dialogue Manager into the scene:
The Dialogue Manager's default settings make it persist across scene changes and ensure that only one copy exists in the scene. You will typically use one Dialogue Manager, added to your main menu scene. You can put other Dialogue Managers in your location scenes so you can test them without having to come in from the main scene. But keep in mind that in normal gameplay the Dialogue Manager from the main scene will carry through and destroy the "test" Dialogue Manager in your location scene.
The Dialogue System Controller component holds the Dialogue System's settings.
The Dialogue Manager loads this dialogue database when it starts.
The Display Settings section contains these subsections:
Subsection | Description |
---|---|
Localization Settings | Controls how language Localization is handled. |
Subtitle Settings | Controls how dialogue UIs display subtitles. |
Camera & Cutscene Settings | Controls how the cutscene sequencer works. |
Input Settings | Controls how player response menus work in conversations. |
Bark Settings | Controls general bark behavior, which you can override on individual barkers or bark UIs. |
Alert Settings | Controls how the dialogue UI displays onscreen alert messages. |
Note: You can override these settings for specific conversations by inspecting the conversation in the Dialogue Editor, selecting Menu → Conversation Properties, and then ticking Override Display Settings.
The Persistent Data Setting section allow you to specify what data are included in saved games and saved across scene changes. These settings affect the PersistentDataManager component and, if you're using the full Save System, the DialogueSystemSaver component.
The Other Settings section contains miscellaneous settings. Of note:
Other Settings | Description |
---|---|
Allow Only One Instance | Should generally be left ticked. Only one Dialogue Manager should exist at time. |
Don't Destroy On Load | Should generally be left ticked. Allows the Dialogue Manager (and its data) to persist across scene changes. |
Warm Up Conversation Controller | Specifies the level of initialization to perform on startup to prevent a hitch when starting the first conversation on low spec devices. |
Don't Hide Immediate During Warmup | Tick if your dialogue UI is always visible even when conversations are not playing. |
Instantiate Database | Loads a copy of the dialogue database into memory instead of using the asset directly in playmode in the Unity editor. |
Include SimStatus | Enables tracking of SimStatus. |
Stop Evaluation At First Valid | Instead of evaluating all children in conversation tree, stop when first valid child is found. |
Reevaluate Links After Subtitle | Tick if you change values that are evaluated by direct children. For more info, see Conversations Evaluate Conditions One Extra Level Ahead. |
Use Linear Group Mode | If a group node's Conditions are true, don't evaluate the remaining sibling group nodes. |
Allow Simultaneous Conversations | Normally if one conversation is active, the Dialogue System allows another conversation to play. Tick this to allow multiple conversations to play at the same time. Each must use its own dialogue UI, which you can assign to the Dialogue System Trigger's Override Dialogue UI field or by adding an Override Dialogue UI component. |
On Start Trigger Wait For Save Data Applied | If loading a saved game or changing scenes using the Save System, Dialogue System Triggers set to OnStart will wait for the save data to be applied to the scene first instead of actually running as soon as the scene starts. |
Dialogue Time Mode | By default, the Dialogue System runs in Realtime mode, which is independent of Time.timeScale. If you want the Dialogue System to respect Time.timeScale, set Dialogue Time Mode to Gameplay. |
Debug Level | Sets the Dialogue System's logging level in the Unity editor's Console and the player log file in builds. This is very handy to trace through Dialogue System activity. |
The Dialogue Manager prefab also has these components:
Instantiates basic UI prefabs into the Dialogue Manager's Canvas. These include Selector Elements (see Triggers & Interaction), and Quest Tracker HUD and Quest Log Window (see Quests). You can assign different prefabs to customize the look of your game, or remove them if you don't need them.
Gracefully detects switches between mouse, joystick, and keyboard control, and helps the UIs know when to auto-focus UI buttons (in joystick and keyboard mode) and when to leave buttons unfocused (in mouse mode). Compatible with Unity's built-in input manager, Unity's Input System package, and Rewired, and provides hooks for other input systems, too.
You may also need to add a standard Unity EventSystem if your scene doesn't already have one.
The Dialogue Manager in the Demo has these additional components:
These components are covered in detail in the Save System section.
The optional Dialogue Manager Setup Wizard will step you through configuration with verbose descriptions of each setting. To run the wizard, click the Dialogue Manager's Wizard button or select menu item Tools → Pixel Crushers → Dialogue System → Wizards → Dialogue Manager Wizard.
<< Welcome to the Dialogue System for Unity! | Triggers & Interaction >>