# Dialogue

Class in [Yarn](https://docs.yarnspinner.dev/api/csharp/yarn)

Inherits from `System.Object`

## Summary

Co-ordinates the execution of Yarn programs.

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

## Constructors

| Name                                                                                                              | Description                                                                                                     |
| ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| [Dialogue(Yarn.IVariableStorage)](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.dialogue/yarn.dialogue..ctor) | Initializes a new instance of the [Dialogue](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.dialogue) class. |

## Fields

| Name                                                                                                                  | Description                              |
| --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
| [DefaultStartNodeName](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.dialogue/yarn.dialogue.defaultstartnodename) | The node that execution will start from. |

## Methods

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

## Properties

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