Dialogue Graph
⚙️ DialogueGraph Class
A graph that contains nodes and connections.
Namespace:
Esper.FeelSpeak.GraphInherits from:FeelSpeakObjectType:class
📦 Fields
public
graphName
string
The searchable name of the graph.
public
text
string
The text that represents this dialogue graph.
public
localizedTexts
List<LocaleString>
A list of localized texts.
public
startingNodeId
int
The ID of the starting node. This is equal to -1 if a starting node has not been set.
public
dialogueNodes
List<DialogueNode>
A list of dialogue nodes.
public
choiceNodes
List<ChoiceNode>
A list of choice nodes.
public
delayNodes
List<DelayNode>
A list of delay nodes.
public
soundNodes
List<SoundNode>
A list of sound nodes.
public
actionNodes
List<ActionNode>
A list of action nodes.
public
booleanNodes
List<BooleanNode>
A list of boolean nodes.
public
nestNodes
List<NestNode>
A list of nest nodes.
public
connections
List<Connection>
A list of all connections.
public
group
DialogueGroup
The dialogue group that this dialogue is a part of.
public
callOnceOnDialogueStarted
UnityEvent
A callback for when any dialogue graph begins. All events are cleared after invoke.
public
callOnceOnDialogueEnded
UnityEvent
A callback for when any dialogue graph ends. All events are cleared after invoke.
🔍 Static Properties
public
resourcesPath
string
The path to all generated objects of this type relative to resources.
🔍 Properties
public
DatabaseRecord
DialogueRecord
The database record.
🧰 Methods
public
UpdateDatabaseRecord()
void
Updates the record of this object in the database.
public
AddNode(Node)
void
Adds a node to the appropriate collection based on its type.
public
RemoveNode(Node)
void
Removes a node from the appropriate collection based on its type.
public
CreateCopy()
DialogueGraph
Creates a copy of this object.
public
CopyData(DialogueGraph)
void
Copies all data of another dialogue, excluding ID.
public
Create(DialogueGroup)
DialogueGraph
Creates a new instance of a DialogueGraph (editor only).
public
UpdateAssetName()
void
Updates the name of the asset (editor only).
public
Save()
void
Saves the dialogue graph and updates database record.
protected
GetID<T>(string)
int
Returns an unused ID for this type.
public
GetAvailableNodeID()
int
Returns an unused node ID.
public
Trigger()
void
Triggers this dialogue.
public
GetText()
string
Gets the graph text of a specific locale or the unlocalized text if localization is disabled.
public
ValidateLocalizedNames(bool)
void
Validates the localized name strings.
public
ValidateConnectionsInNodes()
void
Applies all connections to nodes.
public
PopulateConnections(Node)
void
Repopulates the connection lists of a node.
Getting a Dialogue Graph
You can get a DialogueGraph at runtime with their ID or name with the FeelSpeak.GetDialogueGraph method.
var myDialogueGraph = FeelSpeak.GetDialogueGraph("dialogue name");Getting All From a Group
You can get a list of all DialogueGraphs that are a part of a Dialogue Group with the FeelSpeak.GetDialogueGraphs method.
var myDialogueGraphs = FeelSpeak.GetDialogueGraphs(myDialogueGroup);Last updated