Dialogue Manager

This chapter describes how to set up the Dialogue Manager GameObject in your scenes.

Dialogue Manager Prefab

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.

Dialogue System Controller

The Dialogue System Controller component holds the Dialogue System's settings.

Initial Database

The Dialogue Manager loads this dialogue database when it starts.

Display Settings

The Display Settings section contains these subsections:

  • Localization Settings: Controls how language localization is handled.
  • Subtitle Settings: Controls how the dialogue UI displays subtitles.
  • Camera & Cutscene Settings: Controls how the cutscene sequencer works.
  • Input Settings: Controls how player response menus work in conversations.
  • 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.

Persistent Data Settings

The Persistent Data Setting section allow you to specify what data are included in saved games and saved across scene changes.

Other Settings

The Other Settings section contains miscellaneous settings. Of note:

  • Instantiate Database: Loads a copy of the dialogue database instead of using the asset directly in playmode in the Unity editor.
  • 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.

Other Components

The Dialogue Manager prefab also has these components:

  • Instantiate Prefabs: 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.
  • Input Device Manager: 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).

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:

  • Save System: Handles saved games and persisting data across scene changes.
  • Standard Scene Transition Manager: Used by the Save System to fade out and back in during scene changes. Can also be configured to show a loading scene while loading the next scene.
  • Player Prefs Saved Game Data Storer: Allows the Save System to save to PlayerPrefs.
  • Json Data Serializer: Provides JSON serialization for the Save System.

These components are covered in detail in the Save System section.

Dialogue Manager Setup Wizard

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 >>