# Yarn.Unity Namespace

## Summary

Contains classes for working with Yarn Spinner in the Unity game engine.

## Classes

| Name                                                                                              | Description                                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AssemblyExtensions](/2.1/api/csharp/yarn.unity/yarn.unity.assemblyextensions.md)                 |                                                                                                                                                                                          |
| [AudioLineProvider](/2.1/api/csharp/yarn.unity/yarn.unity.audiolineprovider.md)                   |                                                                                                                                                                                          |
| [AudioLocalizedLine](/2.1/api/csharp/yarn.unity/yarn.unity.audiolocalizedline.md)                 |                                                                                                                                                                                          |
| [CharacterColorView](/2.1/api/csharp/yarn.unity/yarn.unity.charactercolorview.md)                 |                                                                                                                                                                                          |
| [Cultures](/2.1/api/csharp/yarn.unity/yarn.unity.cultures.md)                                     | Provides access to all [Culture](/2.1/api/csharp/yarn.unity/yarn.unity.culture.md) s supported by Yarn Spinner.                                                                          |
| [DialogueAdvanceInput](/2.1/api/csharp/yarn.unity/yarn.unity.dialogueadvanceinput.md)             | A component that listens for user input, and uses it to notify a dialogue view that the user wishes to advance to the next step in the dialogue.                                         |
| [DialogueCharacterNameView](/2.1/api/csharp/yarn.unity/yarn.unity.dialoguecharacternameview.md)   | A subclass of [DialogueViewBase](/2.1/api/csharp/yarn.unity/yarn.unity.dialogueviewbase.md) that displays character names.                                                               |
| [DialogueOption](/2.1/api/csharp/yarn.unity/yarn.unity.dialogueoption.md)                         |                                                                                                                                                                                          |
| [DialogueRunner](/2.1/api/csharp/yarn.unity/yarn.unity.dialoguerunner.md)                         | The DialogueRunner component acts as the interface between your game and Yarn Spinner.                                                                                                   |
| [DialogueViewBase](/2.1/api/csharp/yarn.unity/yarn.unity.dialogueviewbase.md)                     | A `MonoBehaviour` that can present lines and options to the user, when it receives them from a [DialogueRunner](/2.1/api/csharp/yarn.unity/yarn.unity.dialoguerunner.md) .               |
| [Effects](/2.1/api/csharp/yarn.unity/yarn.unity.effects.md)                                       | Contains coroutine methods that apply visual effects. This class is used by [LineView](/2.1/api/csharp/yarn.unity/yarn.unity.lineview.md) to handle animating the presentation of lines. |
| [InMemoryVariableStorage](/2.1/api/csharp/yarn.unity/yarn.unity.inmemoryvariablestorage.md)       | A simple implementation of VariableStorageBehaviour.                                                                                                                                     |
| [LanguageAttribute](/2.1/api/csharp/yarn.unity/yarn.unity.languageattribute.md)                   |                                                                                                                                                                                          |
| [LineProviderBehaviour](/2.1/api/csharp/yarn.unity/yarn.unity.lineproviderbehaviour.md)           | A `MonoBehaviour` that produces [LocalizedLine](/2.1/api/csharp/yarn.unity/yarn.unity.localizedline.md) s, for use in Dialogue Views.                                                    |
| [LineView](/2.1/api/csharp/yarn.unity/yarn.unity.lineview.md)                                     | A Dialogue View that presents lines of dialogue, using Unity UI elements.                                                                                                                |
| [Localization](/2.1/api/csharp/yarn.unity/yarn.unity.localization.md)                             |                                                                                                                                                                                          |
| [LocalizedLine](/2.1/api/csharp/yarn.unity/yarn.unity.localizedline.md)                           | Represents a line, ready to be presented to the user in the localisation they have specified.                                                                                            |
| [OptionsListView](/2.1/api/csharp/yarn.unity/yarn.unity.optionslistview.md)                       |                                                                                                                                                                                          |
| [OptionView](/2.1/api/csharp/yarn.unity/yarn.unity.optionview.md)                                 |                                                                                                                                                                                          |
| [SampleRenderDetector](/2.1/api/csharp/yarn.unity/yarn.unity.samplerenderdetector.md)             | Detects if the render pipeline is different from the one the samples were created with, and warn you that things might look odd.                                                         |
| [SerializedDictionary](/2.1/api/csharp/yarn.unity/yarn.unity.serializeddictionary.md)             | An `IDictionary<TKey,TValue>` that can be serialized as part of a Unity object.                                                                                                          |
| [TextLineProvider](/2.1/api/csharp/yarn.unity/yarn.unity.textlineprovider.md)                     |                                                                                                                                                                                          |
| [VariableStorageBehaviour](/2.1/api/csharp/yarn.unity/yarn.unity.variablestoragebehaviour.md)     | A `MonoBehaviour` that a [DialogueRunner](/2.1/api/csharp/yarn.unity/yarn.unity.dialoguerunner.md) uses to store and retrieve variables.                                                 |
| [VoiceOverView](/2.1/api/csharp/yarn.unity/yarn.unity.voiceoverview.md)                           | A subclass of [DialogueViewBase](/2.1/api/csharp/yarn.unity/yarn.unity.dialogueviewbase.md) that plays voice-over `AudioClip` s for lines of dialogue.                                   |
| [YarnActionAttribute](/2.1/api/csharp/yarn.unity/yarn.unity.yarnactionattribute.md)               |                                                                                                                                                                                          |
| [YarnCommandAttribute](/2.1/api/csharp/yarn.unity/yarn.unity.yarncommandattribute.md)             | An attribute that marks a method on an object as a command.                                                                                                                              |
| [YarnFunctionAttribute](/2.1/api/csharp/yarn.unity/yarn.unity.yarnfunctionattribute.md)           | Marks the method as a function to be registered with the running instance's library.                                                                                                     |
| [YarnLinesAsCanvasText](/2.1/api/csharp/yarn.unity/yarn.unity.yarnlinesascanvastext.md)           | Shows Yarn lines on Canvas Text components.                                                                                                                                              |
| [YarnParameterAttribute](/2.1/api/csharp/yarn.unity/yarn.unity.yarnparameterattribute.md)         | Yarn parameter.                                                                                                                                                                          |
| [YarnProject](/2.1/api/csharp/yarn.unity/yarn.unity.yarnproject.md)                               |                                                                                                                                                                                          |
| [YarnStateInjectorAttribute](/2.1/api/csharp/yarn.unity/yarn.unity.yarnstateinjectorattribute.md) | Inject state for any commands in this class using this static method.                                                                                                                    |

## Structs

| Name                                                                          | Description                         |
| ----------------------------------------------------------------------------- | ----------------------------------- |
| [Culture](/2.1/api/csharp/yarn.unity/yarn.unity.culture.md)                   | Holds information about a language. |
| [StringTableEntry](/2.1/api/csharp/yarn.unity/yarn.unity.stringtableentry.md) |                                     |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yarnspinner.dev/2.1/api/csharp/yarn.unity.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
