This site is for Yarn Spinner v1, and won't be updated. Go to the current site.

DialogueRunner.AddCommandHandler Method

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

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

Remarks

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.

Parameters

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

Source

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