> For the complete documentation index, see [llms.txt](https://docs.yarnspinner.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yarnspinner.dev/2.0/api/csharp/yarn/yarn.dialogue.md).

# Dialogue

Class in [Yarn](/2.0/api/csharp/yarn.md)

Inherits from `System.Object`

## Summary

Co-ordinates the execution of Yarn programs.

```csharp
public class Dialogue : IAttributeMarkerProcessor
```

## Constructors

| Name                                                                                         | Description                                                                                |
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| [Dialogue(Yarn.IVariableStorage)](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue..ctor.md) | Initializes a new instance of the [Dialogue](/2.0/api/csharp/yarn/yarn.dialogue.md) class. |

## Fields

| Name                                                                                             | Description                              |
| ------------------------------------------------------------------------------------------------ | ---------------------------------------- |
| [DefaultStartNodeName](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.defaultstartnodename.md) | The node that execution will start from. |

## Methods

| Name                                                                                                         | Description                                                                                                                                                                      |
| ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AddProgram(Program)](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.addprogram.md)                        | Loads the nodes from the specified [Program](/2.0/api/csharp/yarn/yarn.program.md) , and adds them to the nodes already loaded.                                                  |
| [Continue()](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.continue.md)                                   | Starts, or continues, execution of the current Program.                                                                                                                          |
| [ExpandSubstitutions(string,IList)](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.expandsubstitutions.md) | Replaces all substitution markers in a text with the given substitution list.                                                                                                    |
| [GetStringIDForNode(string)](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.getstringidfornode.md)         | Returns the string ID that contains the original, uncompiled source text for a node.                                                                                             |
| [GetTagsForNode(string)](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.gettagsfornode.md)                 | Returns the tags for the node `nodeName` .                                                                                                                                       |
| [NodeExists(string)](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.nodeexists.md)                         | Gets a value indicating whether a specified node exists in the Program.                                                                                                          |
| [ParseMarkup(string)](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.parsemarkup.md)                       | Parses a line of text, and produces a [MarkupParseResult](/2.0/api/csharp/yarn.markup/yarn.markup.markupparseresult.md) containing the results.                                  |
| [SetNode(string)](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.setnode.md)                               | Prepares the [Dialogue](/2.0/api/csharp/yarn/yarn.dialogue.md) that the user intends to start running a node.                                                                    |
| [SetProgram(Program)](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.setprogram.md)                        | Loads all nodes from the provided [Program](/2.0/api/csharp/yarn/yarn.program.md) .                                                                                              |
| [SetSelectedOption(int)](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.setselectedoption.md)              | Signals to the [Dialogue](/2.0/api/csharp/yarn/yarn.dialogue.md) that the user has selected a specified [Option](/2.0/api/csharp/yarn/yarn.optionset/yarn.optionset.option.md) . |
| [Stop()](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.stop.md)                                           | Immediately stops the [Dialogue](/2.0/api/csharp/yarn/yarn.dialogue.md) .                                                                                                        |
| [UnloadAll()](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.unloadall.md)                                 | Unloads all nodes from the Dialogue.                                                                                                                                             |

## Properties

| Name                                                                                                   | Description                                                                                                                                                                               |
| ------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [CommandHandler](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.commandhandler.md)                   | Gets or sets the [CommandHandler](/2.0/api/csharp/yarn/yarn.commandhandler.md) that is called when a command is to be delivered to the game.                                              |
| [CurrentNode](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.currentnode.md)                         | Gets the name of the node that this Dialogue is currently executing.                                                                                                                      |
| [DialogueCompleteHandler](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.dialoguecompletehandler.md) | Gets or sets the [DialogueCompleteHandler](/2.0/api/csharp/yarn/yarn.dialoguecompletehandler.md) that is called when the dialogue reaches its end.                                        |
| [IsActive](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.isactive.md)                               | Gets a value indicating whether the Dialogue is currently executing Yarn instructions.                                                                                                    |
| [LanguageCode](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.languagecode.md)                       | Gets or sets the [Dialogue](/2.0/api/csharp/yarn/yarn.dialogue.md) 's locale, as an IETF BCP 47 code.                                                                                     |
| [Library](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.library.md)                                 | Gets the [Library](/2.0/api/csharp/yarn/yarn.library.md) that this Dialogue uses to locate functions.                                                                                     |
| [LineHandler](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.linehandler.md)                         | Gets or sets the [LineHandler](/2.0/api/csharp/yarn/yarn.linehandler.md) that is called when a line is ready to be shown to the user.                                                     |
| [LogDebugMessage](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.logdebugmessage.md)                 | Invoked when the Dialogue needs to report debugging information.                                                                                                                          |
| [LogErrorMessage](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.logerrormessage.md)                 | Invoked when the Dialogue needs to report an error.                                                                                                                                       |
| [NodeCompleteHandler](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.nodecompletehandler.md)         | Gets or sets the [NodeCompleteHandler](/2.0/api/csharp/yarn/yarn.nodecompletehandler.md) that is called when a node is complete.                                                          |
| [NodeNames](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.nodenames.md)                             | Gets the names of the nodes in the currently loaded Program.                                                                                                                              |
| [NodeStartHandler](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.nodestarthandler.md)               | Gets or sets the [NodeStartHandler](/2.0/api/csharp/yarn/yarn.nodestarthandler.md) that is called when a node is started.                                                                 |
| [OptionsHandler](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.optionshandler.md)                   | Gets or sets the [OptionsHandler](/2.0/api/csharp/yarn/yarn.optionshandler.md) that is called when a set of options are ready to be shown to the user.                                    |
| [PrepareForLinesHandler](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.prepareforlineshandler.md)   | Gets or sets the [PrepareForLinesHandler](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.prepareforlineshandler.md) that is called when the dialogue anticipates delivering some lines. |
| [VariableStorage](/2.0/api/csharp/yarn/yarn.dialogue/yarn.dialogue.variablestorage.md)                 | Gets or sets the object that provides access to storing and retrieving the values of variables.                                                                                           |
