DialogueRunner.AddCommandHandler Method

Adds a command handler. Dialogue will continue running after the command is called.

public void AddCommandHandler(string commandName, DialogueRunner.CommandHandler handler)


When this command handler has been added, it can be called from your Yarn scripts like so:

<<commandName param1 param2>>

When this command handler is called, the DialogueRunner will not stop executing code.


Parameter Description
string commandName The name of the command.
DialogueRunner.CommandHandler handler The DialogueRunner.CommandHandler that will be invoked when the command is called.


Defined in Unity/Assets/YarnSpinner/Scripts/DialogueRunner.cs, line 305.