> 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/3.1/api/csharp/yarn/yarn.dialogue.md).

# Dialogue

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

Inherits from `System.Object`

## Summary

Co-ordinates the execution of Yarn programs.

```csharp
public class Dialogue : ISmartVariableEvaluator
```

## Constructors

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

## Fields

| Name                                                                                             | Description                                                                                                                          |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| [DefaultStartNodeName](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.defaultstartnodename.md) | The node that execution will start from.                                                                                             |
| [NoOptionSelected](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.nooptionselected.md)         | The value to indicate to the dialogue runner that no option was selected and dialogue should fallthrough to the rest of the program. |

## Methods

| Name                                                                                                                         | Description                                                                                                                                                                      |
| ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Continue()](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.continue.md)                                                   | Starts, or continues, execution of the current Program.                                                                                                                          |
| [GetHeaders(string)](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.getheaders.md)                                         | Gets the collection of headers present on the node named `nodeName` .                                                                                                            |
| [GetHeaderValue(string,string)](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.getheadervalue.md)                          | Gets the value of the header named `headerName` on the node named `nodeName` , or `null` if the header can't be found.                                                           |
| [GetSaliencyOptionsForNodeGroup(string)](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.getsaliencyoptionsfornodegroup.md) | Queries the [Dialogue](/3.1/api/csharp/yarn/yarn.dialogue.md) for what content could possibly run if the node group nodeGroup was run.                                           |
| [GetStringIDForNode(string)](/3.1/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)](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.gettagsfornode.md)                                 | Returns the tags for the node `nodeName` .                                                                                                                                       |
| [HasSalientContent(string)](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.hassalientcontent.md)                           | Returns if the node group has any potential nodes to be run based on the current salient selector.                                                                               |
| [IsNodeGroup(string)](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.isnodegroup.md)                                       | Gets a value indicating whether `nodeName` is the name of a valid node group in the program.                                                                                     |
| [NodeExists(string)](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.nodeexists.md)                                         | Gets a value indicating whether a specified node exists in the Program.                                                                                                          |
| [SetNode(string)](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.setnode.md)                                               | Prepares the [Dialogue](/3.1/api/csharp/yarn/yarn.dialogue.md) that the user intends to start running a node.                                                                    |
| [SetProgram(Program)](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.setprogram.md)                                        | Loads all nodes from the provided [Program](/3.1/api/csharp/yarn/yarn.program.md) .                                                                                              |
| [SetSelectedOption(int)](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.setselectedoption.md)                              | Signals to the [Dialogue](/3.1/api/csharp/yarn/yarn.dialogue.md) that the user has selected a specified [Option](/3.1/api/csharp/yarn/yarn.optionset/yarn.optionset.option.md) . |
| [SignalContentComplete()](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.signalcontentcomplete.md)                         | Signals that the currently running content has completed synchronously.                                                                                                          |
| [Stop()](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.stop.md)                                                           | Immediately stops the [Dialogue](/3.1/api/csharp/yarn/yarn.dialogue.md) .                                                                                                        |
| [TryGetSmartVariable(string,T)](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.trygetsmartvariable.md)                     | Evaluate the value of a smart variable named `name` .                                                                                                                            |
| [UnloadAll()](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.unloadall.md)                                                 | Unloads all nodes from the Dialogue.                                                                                                                                             |

## Properties

| Name                                                                                                   | Description                                                                                                                                                                               |
| ------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [CommandHandler](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.commandhandler.md)                   | Gets or sets the [CommandHandler](/3.1/api/csharp/yarn/yarn.commandhandler.md) that is called when a command is to be delivered to the game.                                              |
| [ContentSaliencyStrategy](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.contentsaliencystrategy.md) | Gets or sets the content saliency strategy used by this [Dialogue](/3.1/api/csharp/yarn/yarn.dialogue.md) .                                                                               |
| [CurrentNode](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.currentnode.md)                         | Gets the name of the node that this Dialogue is currently executing.                                                                                                                      |
| [DialogueCompleteHandler](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.dialoguecompletehandler.md) | Gets or sets the [DialogueCompleteHandler](/3.1/api/csharp/yarn/yarn.dialoguecompletehandler.md) that is called when the dialogue reaches its end.                                        |
| [IsActive](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.isactive.md)                               | Gets a value indicating whether the Dialogue is currently executing Yarn instructions.                                                                                                    |
| [Library](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.library.md)                                 | Gets the [Library](/3.1/api/csharp/yarn/yarn.library.md) that this Dialogue uses to locate functions.                                                                                     |
| [LineHandler](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.linehandler.md)                         | Gets or sets the [LineHandler](/3.1/api/csharp/yarn/yarn.linehandler.md) that is called when a line is ready to be shown to the user.                                                     |
| [LogDebugMessage](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.logdebugmessage.md)                 | Invoked when the Dialogue needs to report debugging information.                                                                                                                          |
| [LogErrorMessage](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.logerrormessage.md)                 | Invoked when the Dialogue needs to report an error.                                                                                                                                       |
| [NodeCompleteHandler](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.nodecompletehandler.md)         | Gets or sets the [NodeCompleteHandler](/3.1/api/csharp/yarn/yarn.nodecompletehandler.md) that is called when a node is complete.                                                          |
| [NodeNames](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.nodenames.md)                             | Gets the names of the nodes in the currently loaded Program.                                                                                                                              |
| [NodeStartHandler](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.nodestarthandler.md)               | Gets or sets the [NodeStartHandler](/3.1/api/csharp/yarn/yarn.nodestarthandler.md) that is called when a node is started.                                                                 |
| [OptionsHandler](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.optionshandler.md)                   | Gets or sets the [OptionsHandler](/3.1/api/csharp/yarn/yarn.optionshandler.md) that is called when a set of options are ready to be shown to the user.                                    |
| [PrepareForLinesHandler](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.prepareforlineshandler.md)   | Gets or sets the [PrepareForLinesHandler](/3.1/api/csharp/yarn/yarn.dialogue/yarn.dialogue.prepareforlineshandler.md) that is called when the dialogue anticipates delivering some lines. |
| [VariableStorage](/3.1/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.                                                                                           |
