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

Public Attributes

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

Properties

string Title [get, set]
 Gets or sets the Title field. More...
 
string Description [get, set]
 Gets or sets the Description field. More...
 
int ActorID [get, set]
 Gets or sets the Actor ID. More...
 
int ConversantID [get, set]
 Gets or sets the Conversant ID. More...
 
- Properties inherited from PixelCrushers.DialogueSystem.Asset
string Name [get, set]
 Gets or sets the Name field. More...
 
string LocalizedName [get]
 Gets the localized Name field. More...
 

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

Initializes a new Conversation.

◆ Conversation() [2/3]

PixelCrushers.DialogueSystem.Conversation.Conversation ( Conversation  sourceConversation)

◆ Conversation() [3/3]

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

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 
)

Copies a Chat Mapper conversation.

Parameters
chatMapperConversationThe Chat Mapper conversation.

◆ GetDialogueEntry() [1/2]

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

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)

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

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 
)

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.
deleteNewlinesAfterPipesIf newline follows pipe, delete it.

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.

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

◆ Description

string PixelCrushers.DialogueSystem.Conversation.Description
getset

Gets or sets the Description field.

The conversation's description, typically only used internally by the developer.

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