PixelCrushers.DialogueSystem.Conversation Class Reference

A conversation asset. More...

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

Public Member Functions

 Conversation ()
 Initializes a new Conversation.
 
 Conversation (Conversation sourceConversation)
 
 Conversation (ChatMapper.Conversation chatMapperConversation, bool putEndSequenceOnLastSplit=true)
 Initializes a new Conversation copied from a Chat Mapper conversation.
 
void Assign (ChatMapper.Conversation chatMapperConversation, bool putEndSequenceOnLastSplit=true)
 Copies a Chat Mapper conversation.
 
DialogueEntry GetDialogueEntry (string title)
 Looks up a dialogue entry by title.
 
DialogueEntry GetDialogueEntry (int dialogueEntryID)
 Looks up a dialogue entry by its ID.
 
DialogueEntry GetFirstDialogueEntry ()
 Looks up the first dialogue entry in the conversation, defined (as in Chat Mapper) as the entry titled START.
 
void SplitPipesIntoEntries (bool putEndSequenceOnLastSplit=true, bool trimWhitespace=false, string uniqueFieldTitle=null)
 Processes all dialogue entries, splitting entries containing pipe characters ("|") into multiple entries.
 
- Public Member Functions inherited from PixelCrushers.DialogueSystem.Asset
 Asset ()
 Initializes a new DialogueAsset.
 
 Asset (Asset sourceAsset)
 Copy constructor.
 
 Asset (int chatMapperID, List< ChatMapper.Field > chatMapperFields)
 Initializes a new DialogueAsset copied from a Chat Mapper asset.
 
void Assign (int chatMapperID, List< ChatMapper.Field > chatMapperFields)
 Copies a Chat Mapper asset.
 
bool FieldExists (string title)
 Checks whether a field exists.
 
string LookupValue (string title)
 Looks up the value of a field.
 
string LookupLocalizedValue (string title)
 Looks up the localized value of a field for the current language.
 
int LookupInt (string title)
 Looks up the value of a field.
 
float LookupFloat (string title)
 Looks up the value of a field.
 
bool LookupBool (string title)
 Looks up the value of a field.
 
bool IsFieldAssigned (string title)
 Checks whether a field exists and has non-empty text.
 
Field AssignedField (string title)
 Returns a field if it exists and has non-empty text.
 

Public Attributes

ConversationOverrideDisplaySettings overrideSettings = new ConversationOverrideDisplaySettings()
 Optional settings to override the Dialogue Manager's Display Settings.
 
string nodeColor = null
 Currently unused by the dialogue system, this is the nodeColor value defined in Chat Mapper.
 
List< DialogueEntrydialogueEntries = new List<DialogueEntry>()
 The dialogue entries in the conversation.
 
List< EntryGroupentryGroups = new List<EntryGroup>()
 
Vector2 canvasScrollPosition = Vector2.zero
 Conversation's scroll position in Dialogue Editor window canvas.
 
float canvasZoom = 1
 Conversation's zoom level in Dialogue Editor window.
 
- Public Attributes inherited from PixelCrushers.DialogueSystem.Asset
int id = 0
 Every asset has an ID number.
 
List< Fieldfields = null
 The asset's fields.
 

Properties

string Title [get, set]
 Gets or sets the Title field.
 
int ActorID [get, set]
 Gets or sets the Actor ID.
 
int ConversantID [get, set]
 Gets or sets the Conversant ID.
 
- Properties inherited from PixelCrushers.DialogueSystem.Asset
string Name [get, set]
 Gets or sets the Name field.
 
string localizedName [get]
 Gets the localized Name field.
 
string Description [get, set]
 Gets or sets the Description field, which is optional and may not exist.
 

Detailed Description

A conversation asset.

A conversation is a collection of dialogue entries (see DialogueEntry) that are linked together to form branching, interactive dialogue between two actors (see Actor).

Constructor & Destructor Documentation

◆ Conversation() [1/3]

PixelCrushers.DialogueSystem.Conversation.Conversation ( )
inline

Initializes a new Conversation.

◆ Conversation() [2/3]

PixelCrushers.DialogueSystem.Conversation.Conversation ( Conversation  sourceConversation)
inline

◆ Conversation() [3/3]

PixelCrushers.DialogueSystem.Conversation.Conversation ( ChatMapper::Conversation  chatMapperConversation,
bool  putEndSequenceOnLastSplit = true 
)
inline

Initializes a new Conversation copied from a Chat Mapper conversation.

Parameters
chatMapperConversationThe Chat Mapper conversation.

Member Function Documentation

◆ Assign()

void PixelCrushers.DialogueSystem.Conversation.Assign ( ChatMapper::Conversation  chatMapperConversation,
bool  putEndSequenceOnLastSplit = true 
)
inline

Copies a Chat Mapper conversation.

Parameters
chatMapperConversationThe Chat Mapper conversation.

◆ GetDialogueEntry() [1/2]

DialogueEntry PixelCrushers.DialogueSystem.Conversation.GetDialogueEntry ( int  dialogueEntryID)
inline

Looks up a dialogue entry by its ID.

Returns
The dialogue entry whose Id matches, or null if no such entry exists.
Parameters
dialogueEntryIDThe dialogue entry ID.

◆ GetDialogueEntry() [2/2]

DialogueEntry PixelCrushers.DialogueSystem.Conversation.GetDialogueEntry ( string  title)
inline

Looks up a dialogue entry by title.

Returns
The dialogue entry whose title matches, or null if no such entry exists.
Parameters
titleThe title of the dialogue entry.

◆ GetFirstDialogueEntry()

DialogueEntry PixelCrushers.DialogueSystem.Conversation.GetFirstDialogueEntry ( )
inline

Looks up the first dialogue entry in the conversation, defined (as in Chat Mapper) as the entry titled START.

Returns
The first dialogue entry in the conversation.

◆ SplitPipesIntoEntries()

void PixelCrushers.DialogueSystem.Conversation.SplitPipesIntoEntries ( bool  putEndSequenceOnLastSplit = true,
bool  trimWhitespace = false,
string  uniqueFieldTitle = null 
)
inline

Processes all dialogue entries, splitting entries containing pipe characters ("|") into multiple entries.

Parameters
putEndSequenceOnLastSplitPut sequencer commands with end keyword on the last split entry, other commands on the first entry, and use default delay for middle entries.
trimWhitespaceTrim whitespace such as newlines.
uniqueFieldTitleIf specified, add "-1", "-2", etc., to this field.

Member Data Documentation

◆ canvasScrollPosition

Vector2 PixelCrushers.DialogueSystem.Conversation.canvasScrollPosition = Vector2.zero

Conversation's scroll position in Dialogue Editor window canvas.

◆ canvasZoom

float PixelCrushers.DialogueSystem.Conversation.canvasZoom = 1

Conversation's zoom level in Dialogue Editor window.

◆ dialogueEntries

List<DialogueEntry> PixelCrushers.DialogueSystem.Conversation.dialogueEntries = new List<DialogueEntry>()

The dialogue entries in the conversation.

◆ entryGroups

List<EntryGroup> PixelCrushers.DialogueSystem.Conversation.entryGroups = new List<EntryGroup>()

◆ nodeColor

string PixelCrushers.DialogueSystem.Conversation.nodeColor = null

Currently unused by the dialogue system, this is the nodeColor value defined in Chat Mapper.

◆ overrideSettings

ConversationOverrideDisplaySettings PixelCrushers.DialogueSystem.Conversation.overrideSettings = new ConversationOverrideDisplaySettings()

Optional settings to override the Dialogue Manager's Display Settings.

Property Documentation

◆ ActorID

int PixelCrushers.DialogueSystem.Conversation.ActorID
getset

Gets or sets the Actor ID.

The actor is the primary participant in the conversation.

The actor ID.

◆ ConversantID

int PixelCrushers.DialogueSystem.Conversation.ConversantID
getset

Gets or sets the Conversant ID.

The conversant is the other participant in the conversation.

The conversant ID.

◆ Title

string PixelCrushers.DialogueSystem.Conversation.Title
getset

Gets or sets the Title field.

The title of the conversation, most often used to look up and start a specific conversation.


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