Description
This class provides all your YamlCore features for makingConstructor
ParleyYaml(string, string, LanguageID?)
Loads and starts a YAML-backed conversation. Same contract as GraphCore.ParleyGraph: construct, hook up events, then drive it with player input. Declarationstring
required
The area folder containing the conversation file.
string
required
The conversation file name without extension or language prefix.
LanguageID?
default:"null"
Optional language override. Defaults to the runner’s current language when null.
Fields
ConversationEnded
Flags whether the conversation has ended or not. DeclarationFlags
Flag register for all of the instance’s set flags. DeclarationMeta
Metadata for the current instance, holds a LanguageID and a TextDirection. DeclarationCurrentLanguage
Holds the value of FallbackLanguage. DeclarationProperties
OnNextDialogue
Fires when the player advances. Await or subscribe as you like. DeclarationCurrentNode
The node currently selected. Null once the conversation ends. DeclarationMethods
BindNextEvent(InputAction)
Rebinds the “advance” signal to a different input action. DeclarationInputAction
required
The input action that will be binded to the event.
UnBindNextEvent(InputAction)
Detaches the input handler. Called automatically on end. DeclarationGetCurrentChoices()
Returns the choices available on the current node, or an empty list if there aren’t any. DeclarationList<ChoiceData>
The choices available on the current node. Empty if the current node is a plain dialogue line with no branching.
ProgressDialogue(string)
Advances the conversation one step. Pass"*" to follow the current node’s NextNode, or a specific node ID to jump. Handles flag-check branching inline — if the current node has CheckFlags, they’re evaluated and the True/False branch is chosen before we move.
Declaration
string
default:"*"
Target node for the transition. When
null or "*", falls back to CurrentNode.NextNode.ChoiceMade(int)
Records a choice pick and follows that choice’s branch. Invalid indices and missing target nodes are handled gracefully, bad input ends the conversation rather than throwing. Declarationint
required
Index of the Choice that has been made.
GetPlayerChoice()
Awaitable choice input. Throws if called while no choices are available — that’s almost always a sign the gameplay state and dialogue state have drifted out of sync, and we’d rather fail loudly than silently hang on a task that will never complete and causing a race. DeclarationTask<int>
The index of the chosen choice.