PixelCrushers.DialogueSystem.DialogueSystemController Class Reference

This component ties together the elements of the Dialogue System: dialogue database, dialogue UI, sequencer, and conversation controller. More...

Inheritance diagram for PixelCrushers.DialogueSystem.DialogueSystemController:
Collaboration diagram for PixelCrushers.DialogueSystem.DialogueSystemController:

Public Types

enum  WarmUpMode { On , Extra , Off }
 

Public Member Functions

void OnDestroy ()
 
void Awake ()
 Initializes the component by setting up the dialogue database and preparing the dialogue UI.
 
void Start ()
 Start by enforcing only one instance is specified.
 
void SetLanguage (string language)
 Sets the language to use for localized text.
 
void PreloadMasterDatabase ()
 Preloads the master database.
 
void PreloadDialogueUI ()
 Preloads the dialogue UI.
 
void PreloadResources ()
 Preloads the resources used by the Dialogue System to avoid delays caused by lazy loading.
 
void WarmUpConversationController ()
 Stop and start a fake conversation to initialize things to avoid a small delay the first time a conversation starts.
 
bool StandardGetInputButtonDown (string buttonName)
 Standard Unity Input method to check if a button is down.
 
bool IsDialogueSystemInputDisabled ()
 Returns true if Dialogue System input is disabled.
 
void SetDialogueSystemInput (bool value)
 Enables or disables Dialogue System input.
 
void AddDatabase (DialogueDatabase database)
 Adds a dialogue database to memory.
 
void RemoveDatabase (DialogueDatabase database)
 Removes a dialogue database from memory.
 
void ResetDatabase (DatabaseResetOptions databaseResetOptions)
 Resets the database to a default state.
 
void ResetDatabase ()
 Resets the database to a default state, keeping all databases loaded.
 
bool ConversationHasValidEntry (string title, Transform actor, Transform conversant, int initialDialogueEntryID=-1)
 Checks whether a conversation has any valid entries linked from the start entry, since it's possible that the conditions of all entries could be false.
 
bool ConversationHasValidEntry (string title, Transform actor)
 Checks whether a conversation has any valid entries linked from the start entry, since it's possible that the conditions of all entries could be false.
 
bool ConversationHasValidEntry (string title)
 Checks whether a conversation has any valid entries linked from the start entry, since it's possible that the conditions of all entries could be false.
 
string GetConversationTitle (int conversationID)
 Returns a conversation title given its ID, or empty string if no conversation has the ID.
 
void StartConversation (string title, Transform actor, Transform conversant, int initialDialogueEntryID, IDialogueUI overrideDialogueUI)
 Starts a conversation, which also broadcasts an OnConversationStart message to the actor and conversant.
 
void StartConversation (string title, Transform actor, Transform conversant, int initialDialogueEntryID)
 Starts a conversation, which also broadcasts an OnConversationStart message to the actor and conversant.
 
void StartConversation (string title, Transform actor, Transform conversant)
 Starts a conversation, which also broadcasts an OnConversationStart message to the actor and conversant.
 
void StartConversation (string title, Transform actor)
 Starts a conversation, which also broadcasts an OnConversationStart message to the actor.
 
void StartConversation (string title)
 Starts the conversation with no transforms specified for the actor or conversant.
 
void StopConversation ()
 Stops the current conversation immediately, and sends an OnConversationEnd message to the actor and conversant.
 
void StopAllConversations ()
 Stops all current conversations immediately.
 
void UpdateResponses ()
 Updates the responses for the current state of the current conversation.
 
Transform FindActorTransformFromConversation (string conversationTitle, string actorField)
 Given a conversation and an actor ID field name (Actor or Conversant), return a corresponding transform in the scene, or null if none found.
 
void SetPortrait (string actorName, string portraitName)
 Sets an actor's portrait.
 
void SetActorPortraitSprite (string actorName, Sprite sprite)
 This method is used internally by SetPortrait() to set the portrait image for an actor.
 
void SetContinueMode (bool value)
 Sets continue button mode to Always (true) or Never (false).
 
void SetContinueMode (DisplaySettings.SubtitleSettings.ContinueButtonMode mode)
 Sets continue button mode.
 
void SetOriginalContinueMode ()
 Reverts continue button mode to the previously-saved mode.
 
void OnEndConversation (ConversationController endingConversationController)
 Handles the end conversation event.
 
void OnConversationTimeout ()
 Handles the conversation response menu timeout event.
 
void UpdateLocalizationOnActiveConversations ()
 
void Bark (string conversationTitle, Transform speaker, Transform listener, BarkHistory barkHistory)
 Causes a character to bark a line at another character.
 
void Bark (string conversationTitle, Transform speaker, Transform listener, int entryID)
 Causes a character to bark a line at another character.
 
void Bark (string conversationTitle, Transform speaker, Transform listener)
 Causes a character to bark a line at another character.
 
void Bark (string conversationTitle, Transform speaker)
 Causes a character to bark a line.
 
void Bark (string conversationTitle, Transform speaker, BarkHistory barkHistory)
 Causes a character to bark a line.
 
void BarkString (string barkText, Transform speaker, Transform listener=null, string sequence=null)
 Causes a character to bark a literal string instead of looking up its line from a conversation.
 
float GetBarkDuration (string barkText)
 Returns the default duration that a string of bark text will be shown.
 
void ShowAlert (string message, float duration)
 Shows an alert message using the dialogue UI.
 
void ShowAlert (string message)
 Shows an alert message using the dialogue UI for the UI's default duration.
 
void CheckAlerts ()
 Checks the value of Lua Variable['Alert'].
 
void HideAlert ()
 Hides the currently-displaying alert message.
 
void HideAllAlerts ()
 Hides the currently-displaying alert message and clears any pending queued alerts.
 
string GetLocalizedText (string s)
 Gets localized text from a text table.
 
Sequencer PlaySequence (string sequence, Transform speaker, Transform listener, bool informParticipants, bool destroyWhenDone, string entrytag)
 Starts a sequence.
 
Sequencer PlaySequence (string sequence, Transform speaker, Transform listener, bool informParticipants, bool destroyWhenDone)
 Starts a sequence.
 
Sequencer PlaySequence (string sequence, Transform speaker, Transform listener, bool informParticipants)
 Starts a sequence.
 
Sequencer PlaySequence (string sequence, Transform speaker, Transform listener)
 Starts a sequence, and sends OnSequenceStart/OnSequenceEnd messages to the participants.
 
Sequencer PlaySequence (string sequence)
 Starts a sequence.
 
void StopSequence (Sequencer sequencer)
 Stops a sequence.
 
void Pause ()
 Pauses the Dialogue System.
 
void Unpause ()
 Unpauses the Dialogue System.
 
void UseDialogueUI (GameObject gameObject)
 Sets the dialogue UI.
 
void SetDialoguePanel (bool show, bool immediate=false)
 Sets the dialogue UI's main panel visible or invisible.
 
void SendUpdateTracker ()
 
void RandomizeNextEntry ()
 
void AddLuaObserver (string luaExpression, LuaWatchFrequency frequency, LuaChangedDelegate luaChangedHandler)
 Adds a Lua expression observer.
 
void RemoveLuaObserver (string luaExpression, LuaWatchFrequency frequency, LuaChangedDelegate luaChangedHandler)
 Removes a Lua expression observer.
 
void RemoveAllObservers (LuaWatchFrequency frequency)
 Removes all Lua expression observers for a specified frequency.
 
void RemoveAllObservers ()
 Removes all Lua expression observers.
 
void RegisterAssetBundle (AssetBundle bundle)
 Registers an asset bundle with the Dialogue System.
 
void UnregisterAssetBundle (AssetBundle bundle)
 Unregisters an asset bundle from the Dialogue System.
 
UnityEngine.Object LoadAsset (string name)
 Loads a named asset from the registered asset bundles or from Resources.
 
UnityEngine.Object LoadAsset (string name, System.Type type)
 Loads a named asset from the registered asset bundles or from Resources.
 
void LoadAsset (string name, System.Type type, AssetLoadedDelegate assetLoaded)
 Loads a named asset from the registered asset bundles, Resources, or Addressables.
 
void UnloadAsset (object obj)
 Unloads an object previously loaded by LoadAsset.
 
void ClearLoadedAssetHashes ()
 Clears the register of loaded addressables.
 
void UnloadAssets ()
 

Static Public Member Functions

static void LuaShowAlert (string message)
 
static void LuaHideAlert ()
 
static string Conditional (bool condition, string value)
 
static void ChangeActorName (string actorName, string newDisplayName)
 Changes an actor's Display Name.
 
static string ActorIDToName (double id)
 
static string ItemIDToName (double id)
 

Public Attributes

DialogueDatabase initialDatabase = null
 The initial dialogue database.
 
DisplaySettings displaySettings = new DisplaySettings()
 The display settings to use for the dialogue UI and sequencer.
 
PersistentDataSettings persistentDataSettings = new PersistentDataSettings()
 Settings to apply to the PersistentDataManager.
 
bool allowSimultaneousConversations = false
 Set true to allow more than one conversation to play simultaneously.
 
bool interruptActiveConversations = false
 If not allowing simultaneous conversations and a conversation is active, stop it if another conversation wants to start.
 
bool includeSimStatus = false
 Set true to include sim status for each dialogue entry.
 
bool instantiateDatabase = true
 
bool preloadResources = true
 If true, preloads the master database and dialogue UI.
 
WarmUpMode warmUpConversationController = WarmUpMode.On
 
bool dontHideImmediateDuringWarmup = false
 
bool dontDestroyOnLoad = true
 If true, Unity will not destroy the game object when loading a new level.
 
bool allowOnlyOneInstance = true
 If true, new DialogueSystemController objects will destroy themselves if one already exists in the scene.
 
bool onStartTriggerWaitForSaveDataApplied = false
 If true, Dialogue System Triggers set to OnStart should wait until save data has been applied or variables initialized.
 
DialogueTime.TimeMode dialogueTimeMode = DialogueTime.TimeMode.Realtime
 Time mode to use for conversations.
 
DialogueDebug.DebugLevel debugLevel = DialogueDebug.DebugLevel.Warning
 The debug level.
 
GetLocalizedTextDelegate overrideGetLocalizedText = null
 Assign to replace the Dialogue System's built-in GetLocalizedText().
 

Static Public Attributes

static bool isWarmingUp = false
 
static bool applicationIsQuitting = false
 
static string lastInitialDatabaseName = null
 

Protected Member Functions

void AddDelegateForAssetBeingLoaded (string name, AssetLoadedDelegate assetLoaded)
 
void RemoveDelegatesForAssetBeingLoaded (string name)
 
void CallDelegatesForAssetBeingLoaded (string name, UnityEngine.Object asset)
 

Protected Attributes

Dictionary< string, List< AssetLoadedDelegate > > m_assetsBeingLoaded = new Dictionary<string, List<AssetLoadedDelegate>>()
 

Properties

bool isInitialized [get]
 True when this Dialogue System Controller is fully initialized.
 
DatabaseManager databaseManager [get]
 Gets the dialogue database manager.
 
DialogueDatabase masterDatabase [get]
 Gets the master dialogue database, which contains the initial database and any additional databases that you have added.
 
IDialogueUI dialogueUI [get, set]
 Gets or sets the dialogue UI, which is an implementation of IDialogueUI.
 
StandardDialogueUI standardDialogueUI [get, set]
 Convenience property that casts the dialogueUI property as a StandardDialogueUI.
 
IsDialogueEntryValidDelegate isDialogueEntryValid [get, set]
 The IsDialogueEntryValid delegate (if one is assigned).
 
System.Action customResponseTimeoutHandler [get, set]
 If response timeout action is set to Custom and menu times out, call this method.
 
GetInputButtonDownDelegate getInputButtonDown [get, set]
 The GetInputButtonDown delegate.
 
bool isConversationActive [get]
 Indicates whether a conversation is currently active.
 
bool isAlternateConversationActive = false [get, set]
 Set true to make isConversationActive report true even if a regular conversation isn't currently active.
 
Transform currentActor [get]
 Gets the current actor of the last conversation started if a conversation is active.
 
Transform currentConversant [get]
 Gets the current conversant of the last conversation started if a conversation is active.
 
ConversationState currentConversationState [get, set]
 Gets or sets the current conversation state of the last conversation that had a line.
 
string lastConversationStarted [get]
 Gets the title of the last conversation started.
 
string lastConversationEnded [get, set]
 
int lastConversationID [get]
 Gets the ID of the last conversation started.
 
ConversationController conversationController [get]
 
ConversationModel conversationModel [get]
 
ConversationView conversationView [get]
 
List< ActiveConversationRecordactiveConversations [get]
 List of conversations that are currently active.
 
ActiveConversationRecord activeConversation [get, set]
 Conversation that is currently being examined by Conditions, Scripts, OnConversationLine, etc.
 
bool allowLuaExceptions [get, set]
 Indicates whether to allow the Lua environment to pass exceptions up to the caller.
 
bool warnIfActorAndConversantSame [get, set]
 If true, warns if a conversation starts with the actor and conversant pointing to the same transform.
 
bool unloadAddressablesOnSceneChange [get, set]
 Unload addressables when changing scenes.
 

Events

System.Action receivedUpdateTracker = delegate { }
 Raised when the Dialogue System receives an UpdateTracker message to update the quest tracker HUD and quest log window.
 
TransformDelegate conversationStarted = delegate { }
 Raised when a conversation starts.
 
TransformDelegate conversationEnded = delegate { }
 Raised when a conversation ends.
 
System.Action stoppingAllConversations = delegate { }
 Raised when StopAllConversations() is called.
 
System.Action initializationComplete = delegate { }
 Raised when the Dialogue System has completely initialized, including loading the initial dialogue database and registering Lua functions.
 

Detailed Description

This component ties together the elements of the Dialogue System: dialogue database, dialogue UI, sequencer, and conversation controller.

You will typically add this to a GameObject named DialogueManager in your scene. For simplified script access, you can use the DialogueManager static class.

Member Enumeration Documentation

◆ WarmUpMode

Member Function Documentation

◆ ActorIDToName()

static string PixelCrushers.DialogueSystem.DialogueSystemController.ActorIDToName ( double  id)
inlinestatic

◆ AddDatabase()

void PixelCrushers.DialogueSystem.DialogueSystemController.AddDatabase ( DialogueDatabase  database)
inline

Adds a dialogue database to memory.

To save memory or reduce load time, you may want to break up your dialogue data into multiple smaller databases. You can add or remove these databases as needed.

Parameters
databaseThe database to add.

◆ AddDelegateForAssetBeingLoaded()

void PixelCrushers.DialogueSystem.DialogueSystemController.AddDelegateForAssetBeingLoaded ( string  name,
AssetLoadedDelegate  assetLoaded 
)
inlineprotected

◆ AddLuaObserver()

void PixelCrushers.DialogueSystem.DialogueSystemController.AddLuaObserver ( string  luaExpression,
LuaWatchFrequency  frequency,
LuaChangedDelegate  luaChangedHandler 
)
inline

Adds a Lua expression observer.

Parameters
luaExpressionLua expression to watch.
frequencyFrequency to check the expression.
luaChangedHandlerDelegate to call when the expression changes. This should be in the form:
void MyDelegate(LuaWatchItem luaWatchItem, Lua.Result newValue) {...}
A static class that provides a global Lua virtual machine.
Definition Lua.cs:18
Watch item for Lua observers.
Definition LuaWatchItem.cs:17
Stores a Lua interpreter result (LuaValue) and provides easy conversion to basic types.
Definition Lua.cs:24

◆ Awake()

void PixelCrushers.DialogueSystem.DialogueSystemController.Awake ( )
inline

Initializes the component by setting up the dialogue database and preparing the dialogue UI.

If the assigned UI is a prefab, an instance is added. If no UI is assigned, the default UI is loaded.

◆ Bark() [1/5]

void PixelCrushers.DialogueSystem.DialogueSystemController.Bark ( string  conversationTitle,
Transform  speaker 
)
inline

Causes a character to bark a line.

A bark is a line spoken outside of a full conversation. It uses a simple gameplay bark UI instead of the dialogue UI. Since this form of the Bark() method does not include a BarkHistory, a random bark is selected from the bark lines.

Parameters
conversationTitleTitle of the conversation that contains the bark lines. In this conversation, all dialogue entries linked from the first entry are considered bark lines.
speakerThe character barking the line.

◆ Bark() [2/5]

void PixelCrushers.DialogueSystem.DialogueSystemController.Bark ( string  conversationTitle,
Transform  speaker,
BarkHistory  barkHistory 
)
inline

Causes a character to bark a line.

A bark is a line spoken outside of a full conversation. It uses a simple gameplay bark UI instead of the dialogue UI.

Parameters
conversationTitleTitle of the conversation that contains the bark lines. In this conversation, all dialogue entries linked from the first entry are considered bark lines.
speakerThe character barking the line.
barkHistoryBark history used to track the most recent bark, so the bark controller can go through the bark lines in a specified order.

◆ Bark() [3/5]

void PixelCrushers.DialogueSystem.DialogueSystemController.Bark ( string  conversationTitle,
Transform  speaker,
Transform  listener 
)
inline

Causes a character to bark a line at another character.

A bark is a line spoken outside of a full conversation. It uses a simple gameplay bark UI instead of the dialogue UI. Since this form of the Bark() method does not include a BarkHistory, a random bark is selected from the bark lines.

Parameters
conversationTitleTitle of the conversation that contains the bark lines. In this conversation, all dialogue entries linked from the first entry are considered bark lines.
speakerThe character barking the line.
listenerThe character being barked at.

◆ Bark() [4/5]

void PixelCrushers.DialogueSystem.DialogueSystemController.Bark ( string  conversationTitle,
Transform  speaker,
Transform  listener,
BarkHistory  barkHistory 
)
inline

Causes a character to bark a line at another character.

A bark is a line spoken outside of a full conversation. It uses a simple gameplay bark UI instead of the dialogue UI.

Parameters
conversationTitleTitle of the conversation that contains the bark lines. In this conversation, all dialogue entries linked from the first entry are considered bark lines.
speakerThe character barking the line.
listenerThe character being barked at.
barkHistoryBark history used to track the most recent bark, so the bark controller can go through the bark lines in a specified order.

◆ Bark() [5/5]

void PixelCrushers.DialogueSystem.DialogueSystemController.Bark ( string  conversationTitle,
Transform  speaker,
Transform  listener,
int  entryID 
)
inline

Causes a character to bark a line at another character.

A bark is a line spoken outside of a full conversation. It uses a simple gameplay bark UI instead of the dialogue UI.

Parameters
conversationTitleTitle of the conversation that contains the bark lines. In this conversation, all dialogue entries linked from the first entry are considered bark lines.
speakerThe character barking the line.
listenerThe character being barked at.
entryIDDialogue entry ID to bark.

◆ BarkString()

void PixelCrushers.DialogueSystem.DialogueSystemController.BarkString ( string  barkText,
Transform  speaker,
Transform  listener = null,
string  sequence = null 
)
inline

Causes a character to bark a literal string instead of looking up its line from a conversation.

Parameters
barkTextThe string to bark.
speakerThe barker.
listenerThe target of the bark. (May be null)
sequenceThe optional sequence to play. (May be null or empty)

◆ CallDelegatesForAssetBeingLoaded()

void PixelCrushers.DialogueSystem.DialogueSystemController.CallDelegatesForAssetBeingLoaded ( string  name,
UnityEngine::Object  asset 
)
inlineprotected

◆ ChangeActorName()

static void PixelCrushers.DialogueSystem.DialogueSystemController.ChangeActorName ( string  actorName,
string  newDisplayName 
)
inlinestatic

Changes an actor's Display Name.

Parameters
actorNameActor's Name field.
newDisplayNameNew Display Name value.

◆ CheckAlerts()

void PixelCrushers.DialogueSystem.DialogueSystemController.CheckAlerts ( )
inline

Checks the value of Lua Variable['Alert'].

If set, it shows the alert and clears the variable.

◆ ClearLoadedAssetHashes()

void PixelCrushers.DialogueSystem.DialogueSystemController.ClearLoadedAssetHashes ( )
inline

Clears the register of loaded addressables.

Typically called automatically when a scene is loaded/unloaded.

◆ Conditional()

static string PixelCrushers.DialogueSystem.DialogueSystemController.Conditional ( bool  condition,
string  value 
)
inlinestatic

◆ ConversationHasValidEntry() [1/3]

bool PixelCrushers.DialogueSystem.DialogueSystemController.ConversationHasValidEntry ( string  title)
inline

Checks whether a conversation has any valid entries linked from the start entry, since it's possible that the conditions of all entries could be false.

Returns
true, if the conversation has a valid entry, false otherwise.
Parameters
titleThe title of the conversation to look up in the master database.

◆ ConversationHasValidEntry() [2/3]

bool PixelCrushers.DialogueSystem.DialogueSystemController.ConversationHasValidEntry ( string  title,
Transform  actor 
)
inline

Checks whether a conversation has any valid entries linked from the start entry, since it's possible that the conditions of all entries could be false.

Returns
true, if the conversation has a valid entry, false otherwise.
Parameters
titleThe title of the conversation to look up in the master database.
actorThe transform of the actor (primary participant). The sequencer uses this to direct camera angles and perform other actions. In PC-NPC conversations, the actor is usually the PC.

◆ ConversationHasValidEntry() [3/3]

bool PixelCrushers.DialogueSystem.DialogueSystemController.ConversationHasValidEntry ( string  title,
Transform  actor,
Transform  conversant,
int  initialDialogueEntryID = -1 
)
inline

Checks whether a conversation has any valid entries linked from the start entry, since it's possible that the conditions of all entries could be false.

Returns
true, if the conversation has a valid entry, false otherwise.
Parameters
titleThe title of the conversation to look up in the master database.
actorThe transform of the actor (primary participant). The sequencer uses this to direct camera angles and perform other actions. In PC-NPC conversations, the actor is usually the PC.
conversantThe transform of the conversant (the other participant). The sequencer uses this to direct camera angles and perform other actions. In PC-NPC conversations, the conversant is usually the NPC.

◆ FindActorTransformFromConversation()

Transform PixelCrushers.DialogueSystem.DialogueSystemController.FindActorTransformFromConversation ( string  conversationTitle,
string  actorField 
)
inline

Given a conversation and an actor ID field name (Actor or Conversant), return a corresponding transform in the scene, or null if none found.

Parameters
conversationTitleConversation title.
actorFieldActor or Conversant.
Returns
Transform in the scene, or null if no appropriate one found.

◆ GetBarkDuration()

float PixelCrushers.DialogueSystem.DialogueSystemController.GetBarkDuration ( string  barkText)
inline

Returns the default duration that a string of bark text will be shown.

Parameters
barkTextThe text that will be barked (to determine the duration).
Returns
The default duration in seconds for the specified bark text.

◆ GetConversationTitle()

string PixelCrushers.DialogueSystem.DialogueSystemController.GetConversationTitle ( int  conversationID)
inline

Returns a conversation title given its ID, or empty string if no conversation has the ID.

◆ GetLocalizedText()

string PixelCrushers.DialogueSystem.DialogueSystemController.GetLocalizedText ( string  s)
inline

Gets localized text from a text table.

Returns
If the specified field exists in the text tables, returns the field's localized text for the current language. Otherwise returns the field itself. If overrideGetLocalizedText is assigned, uses that instead.
Parameters
sThe field to look up.

◆ HideAlert()

void PixelCrushers.DialogueSystem.DialogueSystemController.HideAlert ( )
inline

Hides the currently-displaying alert message.

◆ HideAllAlerts()

void PixelCrushers.DialogueSystem.DialogueSystemController.HideAllAlerts ( )
inline

Hides the currently-displaying alert message and clears any pending queued alerts.

◆ IsDialogueSystemInputDisabled()

bool PixelCrushers.DialogueSystem.DialogueSystemController.IsDialogueSystemInputDisabled ( )
inline

Returns true if Dialogue System input is disabled.

Returns

◆ ItemIDToName()

static string PixelCrushers.DialogueSystem.DialogueSystemController.ItemIDToName ( double  id)
inlinestatic

◆ LoadAsset() [1/3]

UnityEngine.Object PixelCrushers.DialogueSystem.DialogueSystemController.LoadAsset ( string  name)
inline

Loads a named asset from the registered asset bundles or from Resources.

Note: This version now also works with Addressables, and works synchronously.

Returns
The asset, or null if not found.
Parameters
nameName of the asset.

◆ LoadAsset() [2/3]

UnityEngine.Object PixelCrushers.DialogueSystem.DialogueSystemController.LoadAsset ( string  name,
System::Type  type 
)
inline

Loads a named asset from the registered asset bundles or from Resources.

Note: This version now also works with Addressables, and works synchronously.

Returns
The asset, or null if not found.
Parameters
nameName of the asset.
typeType of the asset.

◆ LoadAsset() [3/3]

void PixelCrushers.DialogueSystem.DialogueSystemController.LoadAsset ( string  name,
System::Type  type,
AssetLoadedDelegate  assetLoaded 
)
inline

Loads a named asset from the registered asset bundles, Resources, or Addressables.

Returns the asset in a callback delegate.

Parameters
nameName of the asset.
typeType of the asset
assetLoadedDelegate method to call when returning loaded asset, or null if not found.

◆ LuaHideAlert()

static void PixelCrushers.DialogueSystem.DialogueSystemController.LuaHideAlert ( )
inlinestatic

◆ LuaShowAlert()

static void PixelCrushers.DialogueSystem.DialogueSystemController.LuaShowAlert ( string  message)
inlinestatic

◆ OnConversationTimeout()

void PixelCrushers.DialogueSystem.DialogueSystemController.OnConversationTimeout ( )
inline

Handles the conversation response menu timeout event.

◆ OnDestroy()

void PixelCrushers.DialogueSystem.DialogueSystemController.OnDestroy ( )
inline

◆ OnEndConversation()

void PixelCrushers.DialogueSystem.DialogueSystemController.OnEndConversation ( ConversationController  endingConversationController)
inline

Handles the end conversation event.

◆ Pause()

void PixelCrushers.DialogueSystem.DialogueSystemController.Pause ( )
inline

Pauses the Dialogue System.

Also broadcasts OnDialogueSystemPause to the Dialogue Manager and conversation participants. Conversations, timers, typewriter and fade effects, and the AudioWait() and Voice() sequencer commands will be paused. Other than this, AudioSource, Animation, and Animator components will not be paused; it's up to you to handle them as appropriate for your project.

◆ PlaySequence() [1/5]

Sequencer PixelCrushers.DialogueSystem.DialogueSystemController.PlaySequence ( string  sequence)
inline

Starts a sequence.

See sequencer.

Returns
The sequencer that is playing the sequence.
Parameters
sequenceThe sequence to play.

◆ PlaySequence() [2/5]

Sequencer PixelCrushers.DialogueSystem.DialogueSystemController.PlaySequence ( string  sequence,
Transform  speaker,
Transform  listener 
)
inline

Starts a sequence, and sends OnSequenceStart/OnSequenceEnd messages to the participants.

See sequencer.

Returns
The sequencer that is playing the sequence.
Parameters
sequenceThe sequence to play.
speakerThe speaker, for sequence commands that reference the speaker.
listenerThe listener, for sequence commands that reference the listener.

◆ PlaySequence() [3/5]

Sequencer PixelCrushers.DialogueSystem.DialogueSystemController.PlaySequence ( string  sequence,
Transform  speaker,
Transform  listener,
bool  informParticipants 
)
inline

Starts a sequence.

See sequencer.

Returns
The sequencer that is playing the sequence.
Parameters
sequenceThe sequence to play.
speakerThe speaker, for sequence commands that reference the speaker.
listenerThe listener, for sequence commands that reference the listener.
informParticipantsSpecifies whether to send OnSequenceStart and OnSequenceEnd messages to the speaker and listener. Default is true.

◆ PlaySequence() [4/5]

Sequencer PixelCrushers.DialogueSystem.DialogueSystemController.PlaySequence ( string  sequence,
Transform  speaker,
Transform  listener,
bool  informParticipants,
bool  destroyWhenDone 
)
inline

Starts a sequence.

See sequencer.

Returns
The sequencer that is playing the sequence.
Parameters
sequenceThe sequence to play.
speakerThe speaker, for sequence commands that reference the speaker.
listenerThe listener, for sequence commands that reference the listener.
informParticipantsSpecifies whether to send OnSequenceStart and OnSequenceEnd messages to the speaker and listener. Default is true.
destroyWhenDoneSpecifies whether destroy the sequencer when done playing the sequence. Default is true.

◆ PlaySequence() [5/5]

Sequencer PixelCrushers.DialogueSystem.DialogueSystemController.PlaySequence ( string  sequence,
Transform  speaker,
Transform  listener,
bool  informParticipants,
bool  destroyWhenDone,
string  entrytag 
)
inline

Starts a sequence.

See sequencer.

Parameters
sequenceThe sequence to play.
speakerThe speaker, for sequence commands that reference the speaker.
listenerThe listener, for sequence commands that reference the listener.
informParticipantsSpecifies whether to send OnSequenceStart and OnSequenceEnd messages to the speaker and listener. Default is true.
destroyWhenDoneSpecifies whether destroy the sequencer when done playing the sequence. Default is
entrytagThe entrytag to associate with the sequence.
Returns
The sequencer that is playing the sequence.

◆ PreloadDialogueUI()

void PixelCrushers.DialogueSystem.DialogueSystemController.PreloadDialogueUI ( )
inline

Preloads the dialogue UI.

The Dialogue System delays loading of the dialogue UI until the first time it's needed for a conversation or alert. Since dialogue UIs often contain textures and other art assets, loading can cause a slight pause. You may want to preload the UI at a time of your design by using this method.

◆ PreloadMasterDatabase()

void PixelCrushers.DialogueSystem.DialogueSystemController.PreloadMasterDatabase ( )
inline

Preloads the master database.

The Dialogue System delays loading of the dialogue database until the data is needed. This avoids potentially long delays during Start(). If you want to load the database manually (for example to run Lua commands on its contents), call this method.

◆ PreloadResources()

void PixelCrushers.DialogueSystem.DialogueSystemController.PreloadResources ( )
inline

Preloads the resources used by the Dialogue System to avoid delays caused by lazy loading.

◆ RandomizeNextEntry()

void PixelCrushers.DialogueSystem.DialogueSystemController.RandomizeNextEntry ( )
inline

◆ RegisterAssetBundle()

void PixelCrushers.DialogueSystem.DialogueSystemController.RegisterAssetBundle ( AssetBundle  bundle)
inline

Registers an asset bundle with the Dialogue System.

This allows sequencer commands to load assets inside it.

Parameters
bundleAsset bundle.

◆ RemoveAllObservers() [1/2]

void PixelCrushers.DialogueSystem.DialogueSystemController.RemoveAllObservers ( )
inline

Removes all Lua expression observers.

◆ RemoveAllObservers() [2/2]

void PixelCrushers.DialogueSystem.DialogueSystemController.RemoveAllObservers ( LuaWatchFrequency  frequency)
inline

Removes all Lua expression observers for a specified frequency.

Parameters
frequencyFrequency.

◆ RemoveDatabase()

void PixelCrushers.DialogueSystem.DialogueSystemController.RemoveDatabase ( DialogueDatabase  database)
inline

Removes a dialogue database from memory.

To save memory or reduce load time, you may want to break up your dialogue data into multiple smaller databases. You can add or remove these databases as needed.

Parameters
databaseThe database to remove.

◆ RemoveDelegatesForAssetBeingLoaded()

void PixelCrushers.DialogueSystem.DialogueSystemController.RemoveDelegatesForAssetBeingLoaded ( string  name)
inlineprotected

◆ RemoveLuaObserver()

void PixelCrushers.DialogueSystem.DialogueSystemController.RemoveLuaObserver ( string  luaExpression,
LuaWatchFrequency  frequency,
LuaChangedDelegate  luaChangedHandler 
)
inline

Removes a Lua expression observer.

To be removed, the expression, frequency, and notification delegate must all match.

Parameters
luaExpressionLua expression being watched.
frequencyFrequency that the expression is being watched.
luaChangedHandlerDelegate that's called when the expression changes.

◆ ResetDatabase() [1/2]

void PixelCrushers.DialogueSystem.DialogueSystemController.ResetDatabase ( )
inline

Resets the database to a default state, keeping all databases loaded.

◆ ResetDatabase() [2/2]

void PixelCrushers.DialogueSystem.DialogueSystemController.ResetDatabase ( DatabaseResetOptions  databaseResetOptions)
inline

Resets the database to a default state.

Parameters
databaseResetOptionsAccepts the following values:
  • RevertToDefault: Restores the default database, removing any other databases that were added after startup.
  • KeepAllLoaded: Keeps all loaded databases in memory, but reverts them to their starting values.

◆ SendUpdateTracker()

void PixelCrushers.DialogueSystem.DialogueSystemController.SendUpdateTracker ( )
inline

◆ SetActorPortraitSprite()

void PixelCrushers.DialogueSystem.DialogueSystemController.SetActorPortraitSprite ( string  actorName,
Sprite  sprite 
)
inline

This method is used internally by SetPortrait() to set the portrait image for an actor.

Parameters
actorNameActor name.
spritePortrait sprite.

◆ SetContinueMode() [1/2]

void PixelCrushers.DialogueSystem.DialogueSystemController.SetContinueMode ( bool  value)
inline

Sets continue button mode to Always (true) or Never (false).

Before changing, records current mode so you can use SetOriginalContinueMode() to revert the setting.

◆ SetContinueMode() [2/2]

void PixelCrushers.DialogueSystem.DialogueSystemController.SetContinueMode ( DisplaySettings::SubtitleSettings::ContinueButtonMode  mode)
inline

Sets continue button mode.

Before changing, records current mode so you can use SetOriginalContinueMode() to revert the setting.

◆ SetDialoguePanel()

void PixelCrushers.DialogueSystem.DialogueSystemController.SetDialoguePanel ( bool  show,
bool  immediate = false 
)
inline

Sets the dialogue UI's main panel visible or invisible.

Parameters
showIf true, show (or re-show) the panel; if false, hide it.
immediateIf true, skip animation and change immediately.

◆ SetDialogueSystemInput()

void PixelCrushers.DialogueSystem.DialogueSystemController.SetDialogueSystemInput ( bool  value)
inline

Enables or disables Dialogue System input.

Parameters
valueTrue to enable, false to disable.

◆ SetLanguage()

void PixelCrushers.DialogueSystem.DialogueSystemController.SetLanguage ( string  language)
inline

Sets the language to use for localized text.

Parameters
languageLanguage to use. Specify null or an emtpy string to use the default language.

◆ SetOriginalContinueMode()

void PixelCrushers.DialogueSystem.DialogueSystemController.SetOriginalContinueMode ( )
inline

Reverts continue button mode to the previously-saved mode.

◆ SetPortrait()

void PixelCrushers.DialogueSystem.DialogueSystemController.SetPortrait ( string  actorName,
string  portraitName 
)
inline

Sets an actor's portrait.

If can be:

  • 'default' or null to use the primary portrait defined in the database,
  • 'pic=#' to use an alternate portrait defined in the database (numbered from 2), or
  • the name of a texture in a Resources folder.
Parameters
actorNameActor name.
portraitNamePortrait name.

◆ ShowAlert() [1/2]

void PixelCrushers.DialogueSystem.DialogueSystemController.ShowAlert ( string  message)
inline

Shows an alert message using the dialogue UI for the UI's default duration.

Parameters
messageThe message to show.

◆ ShowAlert() [2/2]

void PixelCrushers.DialogueSystem.DialogueSystemController.ShowAlert ( string  message,
float  duration 
)
inline

Shows an alert message using the dialogue UI.

Parameters
messageThe message to show.
durationThe duration in seconds to show the message.

◆ StandardGetInputButtonDown()

bool PixelCrushers.DialogueSystem.DialogueSystemController.StandardGetInputButtonDown ( string  buttonName)
inline

Standard Unity Input method to check if a button is down.

Parameters
buttonName
Returns

◆ Start()

void PixelCrushers.DialogueSystem.DialogueSystemController.Start ( )
inline

Start by enforcing only one instance is specified.

Then start monitoring alerts.

◆ StartConversation() [1/5]

void PixelCrushers.DialogueSystem.DialogueSystemController.StartConversation ( string  title)
inline

Starts the conversation with no transforms specified for the actor or conversant.

Parameters
titleThe title of the conversation to look up in the master database.

◆ StartConversation() [2/5]

void PixelCrushers.DialogueSystem.DialogueSystemController.StartConversation ( string  title,
Transform  actor 
)
inline

Starts a conversation, which also broadcasts an OnConversationStart message to the actor.

Your scripts can listen for OnConversationStart to do anything necessary at the beginning of a conversation, such as pausing other gameplay or temporarily disabling player control. See the Feature Demo scene, which uses the SetEnabledOnDialogueEvent component to disable player control during conversations.

Parameters
titleThe title of the conversation to look up in the master database.
actorThe transform of the actor (primary participant). The sequencer uses this to direct camera angles and perform other actions. In PC-NPC conversations, the actor is usually the PC.

◆ StartConversation() [3/5]

void PixelCrushers.DialogueSystem.DialogueSystemController.StartConversation ( string  title,
Transform  actor,
Transform  conversant 
)
inline

Starts a conversation, which also broadcasts an OnConversationStart message to the actor and conversant.

Your scripts can listen for OnConversationStart to do anything necessary at the beginning of a conversation, such as pausing other gameplay or temporarily disabling player control. See the Feature Demo scene, which uses the SetEnabledOnDialogueEvent component to disable player control during conversations.

Parameters
titleThe title of the conversation to look up in the master database.
actorThe transform of the actor (primary participant). The sequencer uses this to direct camera angles and perform other actions. In PC-NPC conversations, the actor is usually the PC.
conversantThe transform of the conversant (the other participant). The sequencer uses this to direct camera angles and perform other actions. In PC-NPC conversations, the conversant is usually the NPC.

Example:

StartConversation("Shopkeeper Conversation", player, shopkeeper);

◆ StartConversation() [4/5]

void PixelCrushers.DialogueSystem.DialogueSystemController.StartConversation ( string  title,
Transform  actor,
Transform  conversant,
int  initialDialogueEntryID 
)
inline

Starts a conversation, which also broadcasts an OnConversationStart message to the actor and conversant.

Your scripts can listen for OnConversationStart to do anything necessary at the beginning of a conversation, such as pausing other gameplay or temporarily disabling player control. See the Feature Demo scene, which uses the SetEnabledOnDialogueEvent component to disable player control during conversations.

Parameters
titleThe title of the conversation to look up in the master database.
actorThe transform of the actor (primary participant). The sequencer uses this to direct camera angles and perform other actions. In PC-NPC conversations, the actor is usually the PC.
conversantThe transform of the conversant (the other participant). The sequencer uses this to direct camera angles and perform other actions. In PC-NPC conversations, the conversant is usually the NPC.
initialDialogueEntryIDThe initial dialogue entry ID, or -1 to start from the beginning.

Example:

StartConversation("Shopkeeper Conversation", player, shopkeeper, 8);

◆ StartConversation() [5/5]

void PixelCrushers.DialogueSystem.DialogueSystemController.StartConversation ( string  title,
Transform  actor,
Transform  conversant,
int  initialDialogueEntryID,
IDialogueUI  overrideDialogueUI 
)
inline

Starts a conversation, which also broadcasts an OnConversationStart message to the actor and conversant.

Your scripts can listen for OnConversationStart to do anything necessary at the beginning of a conversation, such as pausing other gameplay or temporarily disabling player control. See the Feature Demo scene, which uses the SetEnabledOnDialogueEvent component to disable player control during conversations.

Parameters
titleThe title of the conversation to look up in the master database.
actorThe transform of the actor (primary participant). The sequencer uses this to direct camera angles and perform other actions. In PC-NPC conversations, the actor is usually the PC.
conversantThe transform of the conversant (the other participant). The sequencer uses this to direct camera angles and perform other actions. In PC-NPC conversations, the conversant is usually the NPC.
initialDialogueEntryIDThe initial dialogue entry ID, or -1 to start from the beginning.
overrideDialogueUIDialogue UI to use instead of default dialogue UI.

Example:

StartConversation("Shopkeeper Conversation", player, shopkeeper, 8, specialDialogueUI);

◆ StopAllConversations()

void PixelCrushers.DialogueSystem.DialogueSystemController.StopAllConversations ( )
inline

Stops all current conversations immediately.

◆ StopConversation()

void PixelCrushers.DialogueSystem.DialogueSystemController.StopConversation ( )
inline

Stops the current conversation immediately, and sends an OnConversationEnd message to the actor and conversant.

Your scripts can listen for OnConversationEnd to do anything necessary at the end of a conversation, such as resuming other gameplay or re-enabling player control.

◆ StopSequence()

void PixelCrushers.DialogueSystem.DialogueSystemController.StopSequence ( Sequencer  sequencer)
inline

Stops a sequence.

Parameters
sequencerThe sequencer playing the sequence.

◆ UnloadAsset()

void PixelCrushers.DialogueSystem.DialogueSystemController.UnloadAsset ( object  obj)
inline

Unloads an object previously loaded by LoadAsset.

Only unloads if using addressables.

◆ UnloadAssets()

void PixelCrushers.DialogueSystem.DialogueSystemController.UnloadAssets ( )
inline

◆ Unpause()

void PixelCrushers.DialogueSystem.DialogueSystemController.Unpause ( )
inline

Unpauses the Dialogue System.

Also broadcasts OnDialogueSystemUnpause to the Dialogue Manager and conversation participants.

◆ UnregisterAssetBundle()

void PixelCrushers.DialogueSystem.DialogueSystemController.UnregisterAssetBundle ( AssetBundle  bundle)
inline

Unregisters an asset bundle from the Dialogue System.

Always unregister asset bundles before freeing them.

Parameters
bundleAsset bundle.

◆ UpdateLocalizationOnActiveConversations()

void PixelCrushers.DialogueSystem.DialogueSystemController.UpdateLocalizationOnActiveConversations ( )
inline

◆ UpdateResponses()

void PixelCrushers.DialogueSystem.DialogueSystemController.UpdateResponses ( )
inline

Updates the responses for the current state of the current conversation.

If the response menu entries' conditions have changed while the response menu is being shown, you can call this method to update the response menu.

◆ UseDialogueUI()

void PixelCrushers.DialogueSystem.DialogueSystemController.UseDialogueUI ( GameObject  gameObject)
inline

Sets the dialogue UI.

(Deprecated; just set DialogueUI now.)

Parameters
gameObjectGame object containing an implementation of IDialogueUI.

◆ WarmUpConversationController()

void PixelCrushers.DialogueSystem.DialogueSystemController.WarmUpConversationController ( )
inline

Stop and start a fake conversation to initialize things to avoid a small delay the first time a conversation starts.

Member Data Documentation

◆ allowOnlyOneInstance

bool PixelCrushers.DialogueSystem.DialogueSystemController.allowOnlyOneInstance = true

If true, new DialogueSystemController objects will destroy themselves if one already exists in the scene.

Otherwise, if you reload a level and dontDestroyOnLoad is true, you'll end up with a second object.

◆ allowSimultaneousConversations

bool PixelCrushers.DialogueSystem.DialogueSystemController.allowSimultaneousConversations = false

Set true to allow more than one conversation to play simultaneously.

◆ applicationIsQuitting

bool PixelCrushers.DialogueSystem.DialogueSystemController.applicationIsQuitting = false
static

◆ debugLevel

DialogueDebug.DebugLevel PixelCrushers.DialogueSystem.DialogueSystemController.debugLevel = DialogueDebug.DebugLevel.Warning

The debug level.

Information at this level or higher is logged to the console. This can be helpful when tracing through conversations.

◆ dialogueTimeMode

DialogueTime.TimeMode PixelCrushers.DialogueSystem.DialogueSystemController.dialogueTimeMode = DialogueTime.TimeMode.Realtime

Time mode to use for conversations.

  • Realtime: Independent of Time.timeScale.
  • Gameplay: Observe Time.timeScale.
  • Custom: You must manually set DialogueTime.time.

◆ displaySettings

DisplaySettings PixelCrushers.DialogueSystem.DialogueSystemController.displaySettings = new DisplaySettings()

The display settings to use for the dialogue UI and sequencer.

◆ dontDestroyOnLoad

bool PixelCrushers.DialogueSystem.DialogueSystemController.dontDestroyOnLoad = true

If true, Unity will not destroy the game object when loading a new level.

◆ dontHideImmediateDuringWarmup

bool PixelCrushers.DialogueSystem.DialogueSystemController.dontHideImmediateDuringWarmup = false

◆ includeSimStatus

bool PixelCrushers.DialogueSystem.DialogueSystemController.includeSimStatus = false

Set true to include sim status for each dialogue entry.

◆ initialDatabase

DialogueDatabase PixelCrushers.DialogueSystem.DialogueSystemController.initialDatabase = null

The initial dialogue database.

◆ instantiateDatabase

bool PixelCrushers.DialogueSystem.DialogueSystemController.instantiateDatabase = true

◆ interruptActiveConversations

bool PixelCrushers.DialogueSystem.DialogueSystemController.interruptActiveConversations = false

If not allowing simultaneous conversations and a conversation is active, stop it if another conversation wants to start.

◆ isWarmingUp

bool PixelCrushers.DialogueSystem.DialogueSystemController.isWarmingUp = false
static

◆ lastInitialDatabaseName

string PixelCrushers.DialogueSystem.DialogueSystemController.lastInitialDatabaseName = null
static

◆ m_assetsBeingLoaded

Dictionary<string, List<AssetLoadedDelegate> > PixelCrushers.DialogueSystem.DialogueSystemController.m_assetsBeingLoaded = new Dictionary<string, List<AssetLoadedDelegate>>()
protected

◆ onStartTriggerWaitForSaveDataApplied

bool PixelCrushers.DialogueSystem.DialogueSystemController.onStartTriggerWaitForSaveDataApplied = false

If true, Dialogue System Triggers set to OnStart should wait until save data has been applied or variables initialized.

◆ overrideGetLocalizedText

GetLocalizedTextDelegate PixelCrushers.DialogueSystem.DialogueSystemController.overrideGetLocalizedText = null

Assign to replace the Dialogue System's built-in GetLocalizedText().

◆ persistentDataSettings

PersistentDataSettings PixelCrushers.DialogueSystem.DialogueSystemController.persistentDataSettings = new PersistentDataSettings()

Settings to apply to the PersistentDataManager.

◆ preloadResources

bool PixelCrushers.DialogueSystem.DialogueSystemController.preloadResources = true

If true, preloads the master database and dialogue UI.

Otherwise they're lazy- loaded only before the first time they're needed.

◆ warmUpConversationController

WarmUpMode PixelCrushers.DialogueSystem.DialogueSystemController.warmUpConversationController = WarmUpMode.On

Property Documentation

◆ activeConversation

ActiveConversationRecord PixelCrushers.DialogueSystem.DialogueSystemController.activeConversation
getset

Conversation that is currently being examined by Conditions, Scripts, OnConversationLine, etc.

◆ activeConversations

List<ActiveConversationRecord> PixelCrushers.DialogueSystem.DialogueSystemController.activeConversations
get

List of conversations that are currently active.

◆ allowLuaExceptions

bool PixelCrushers.DialogueSystem.DialogueSystemController.allowLuaExceptions
getset

Indicates whether to allow the Lua environment to pass exceptions up to the caller.

The default is false, which allows Lua to catch exceptions and just log an error to the console.

true to allow Lua exceptions; otherwise, false.

◆ conversationController

ConversationController PixelCrushers.DialogueSystem.DialogueSystemController.conversationController
get

◆ conversationModel

ConversationModel PixelCrushers.DialogueSystem.DialogueSystemController.conversationModel
get

◆ conversationView

ConversationView PixelCrushers.DialogueSystem.DialogueSystemController.conversationView
get

◆ currentActor

Transform PixelCrushers.DialogueSystem.DialogueSystemController.currentActor
get

Gets the current actor of the last conversation started if a conversation is active.

The current actor.

◆ currentConversant

Transform PixelCrushers.DialogueSystem.DialogueSystemController.currentConversant
get

Gets the current conversant of the last conversation started if a conversation is active.

The current conversant.

◆ currentConversationState

ConversationState PixelCrushers.DialogueSystem.DialogueSystemController.currentConversationState
getset

Gets or sets the current conversation state of the last conversation that had a line.

This is set by ConversationController as the conversation moves from state to state.

The current conversation state.

◆ customResponseTimeoutHandler

System.Action PixelCrushers.DialogueSystem.DialogueSystemController.customResponseTimeoutHandler
getset

If response timeout action is set to Custom and menu times out, call this method.

◆ databaseManager

DatabaseManager PixelCrushers.DialogueSystem.DialogueSystemController.databaseManager
get

Gets the dialogue database manager.

The database manager.

◆ dialogueUI

IDialogueUI PixelCrushers.DialogueSystem.DialogueSystemController.dialogueUI
getset

Gets or sets the dialogue UI, which is an implementation of IDialogueUI.

The dialogue UI.

◆ getInputButtonDown

GetInputButtonDownDelegate PixelCrushers.DialogueSystem.DialogueSystemController.getInputButtonDown
getset

The GetInputButtonDown delegate.

Overrides calls to the standard Unity Input.GetButtonDown function.

◆ isAlternateConversationActive

bool PixelCrushers.DialogueSystem.DialogueSystemController.isAlternateConversationActive = false
getset

Set true to make isConversationActive report true even if a regular conversation isn't currently active.

◆ isConversationActive

bool PixelCrushers.DialogueSystem.DialogueSystemController.isConversationActive
get

Indicates whether a conversation is currently active.

true if the conversation is active; otherwise, false.

◆ isDialogueEntryValid

IsDialogueEntryValidDelegate PixelCrushers.DialogueSystem.DialogueSystemController.isDialogueEntryValid
getset

The IsDialogueEntryValid delegate (if one is assigned).

This is an optional delegate that you can add to check if a dialogue entry is valid before allowing a conversation to use it.

◆ isInitialized

bool PixelCrushers.DialogueSystem.DialogueSystemController.isInitialized
get

True when this Dialogue System Controller is fully initialized.

◆ lastConversationEnded

string PixelCrushers.DialogueSystem.DialogueSystemController.lastConversationEnded
getset

◆ lastConversationID

int PixelCrushers.DialogueSystem.DialogueSystemController.lastConversationID
get

Gets the ID of the last conversation started.

◆ lastConversationStarted

string PixelCrushers.DialogueSystem.DialogueSystemController.lastConversationStarted
get

Gets the title of the last conversation started.

If a conversation is active, this is the title of the active conversation.

The title of the last conversation started.

◆ masterDatabase

DialogueDatabase PixelCrushers.DialogueSystem.DialogueSystemController.masterDatabase
get

Gets the master dialogue database, which contains the initial database and any additional databases that you have added.

The master database.

◆ standardDialogueUI

StandardDialogueUI PixelCrushers.DialogueSystem.DialogueSystemController.standardDialogueUI
getset

Convenience property that casts the dialogueUI property as a StandardDialogueUI.

If the dialogueUI is not a StandardDialogueUI, returns null.

◆ unloadAddressablesOnSceneChange

bool PixelCrushers.DialogueSystem.DialogueSystemController.unloadAddressablesOnSceneChange
getset

Unload addressables when changing scenes.

Some sequencer commands such as Audio() do not unload their addressables, so this cleans them up.

◆ warnIfActorAndConversantSame

bool PixelCrushers.DialogueSystem.DialogueSystemController.warnIfActorAndConversantSame
getset

If true, warns if a conversation starts with the actor and conversant pointing to the same transform.

Default is false.

true to warn when actor and conversant are the same; otherwise, false.

Event Documentation

◆ conversationEnded

TransformDelegate PixelCrushers.DialogueSystem.DialogueSystemController.conversationEnded = delegate { }

Raised when a conversation ends.

Parameter is primary actor.

◆ conversationStarted

TransformDelegate PixelCrushers.DialogueSystem.DialogueSystemController.conversationStarted = delegate { }

Raised when a conversation starts.

Parameter is primary actor.

◆ initializationComplete

System.Action PixelCrushers.DialogueSystem.DialogueSystemController.initializationComplete = delegate { }

Raised when the Dialogue System has completely initialized, including loading the initial dialogue database and registering Lua functions.

◆ receivedUpdateTracker

System.Action PixelCrushers.DialogueSystem.DialogueSystemController.receivedUpdateTracker = delegate { }

Raised when the Dialogue System receives an UpdateTracker message to update the quest tracker HUD and quest log window.

◆ stoppingAllConversations

System.Action PixelCrushers.DialogueSystem.DialogueSystemController.stoppingAllConversations = delegate { }

Raised when StopAllConversations() is called.


The documentation for this class was generated from the following file: