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

# Yarn.Unity Namespace

## Summary

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

## Attributes

| Name                                                                            | Description |
| ------------------------------------------------------------------------------- | ----------- |
| [YarnActionAttribute](/api/csharp/yarn.unity/yarn.unity.yarnactionattribute.md) |             |

## Classes

| Name                                                                                                                          | Description                                                                                                                                                                                                                                                                                                                   |
| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [ActionMarkupHandler](/api/csharp/yarn.unity/yarn.unity.actionmarkuphandler.md)                                               | This is an abstract monobehaviour that conforms to the [IActionMarkupHandler](/api/csharp/yarn.unity/yarn.unity.iactionmarkuphandler.md) interface.                                                                                                                                                                           |
| [ActionRegistrationExtension](/api/csharp/yarn.unity/yarn.unity.actionregistrationextension.md)                               | Contains extension methods for [IActionRegistration](/api/csharp/yarn.unity/yarn.unity.iactionregistration.md) objects.                                                                                                                                                                                                       |
| [Actions](/api/csharp/yarn.unity/yarn.unity.actions.md)                                                                       |                                                                                                                                                                                                                                                                                                                               |
| [BuiltinLocalisedLineProvider](/api/csharp/yarn.unity/yarn.unity.builtinlocalisedlineprovider.md)                             |                                                                                                                                                                                                                                                                                                                               |
| [Cultures](/api/csharp/yarn.unity/yarn.unity.cultures.md)                                                                     | Provides access to all [Culture](/api/csharp/yarn.unity/yarn.unity.culture.md) s supported by Yarn Spinner.                                                                                                                                                                                                                   |
| [DialogueOption](/api/csharp/yarn.unity/yarn.unity.dialogueoption.md)                                                         |                                                                                                                                                                                                                                                                                                                               |
| [DialoguePresenterBase](/api/csharp/yarn.unity/yarn.unity.dialoguepresenterbase.md)                                           | A `UnityEngine.MonoBehaviour` that can present lines and options to the user, when it receives them from a [DialogueRunner](/api/csharp/yarn.unity/yarn.unity.dialoguerunner.md) .                                                                                                                                            |
| [DialogueReference](/api/csharp/yarn.unity/yarn.unity.dialoguereference.md)                                                   | Stores a reference to a dialogue node in a Yarn Project.                                                                                                                                                                                                                                                                      |
| [DialogueRunner](/api/csharp/yarn.unity/yarn.unity.dialoguerunner.md)                                                         |                                                                                                                                                                                                                                                                                                                               |
| [Effects](/api/csharp/yarn.unity/yarn.unity.effects.md)                                                                       |                                                                                                                                                                                                                                                                                                                               |
| [GeneratedVariableStorageExtensions](/api/csharp/yarn.unity/yarn.unity.generatedvariablestorageextensions.md)                 |                                                                                                                                                                                                                                                                                                                               |
| [InMemoryVariableStorage](/api/csharp/yarn.unity/yarn.unity.inmemoryvariablestorage.md)                                       | A simple implementation of VariableStorageBehaviour.                                                                                                                                                                                                                                                                          |
| [InputSystemAvailability](/api/csharp/yarn.unity/yarn.unity.inputsystemavailability.md)                                       |                                                                                                                                                                                                                                                                                                                               |
| [InstantTypewriter](/api/csharp/yarn.unity/yarn.unity.instanttypewriter.md)                                                   | An implementation of [IAsyncTypewriter](/api/csharp/yarn.unity/yarn.unity.iasynctypewriter.md) that delivers all content instantly, and invokes any [IActionMarkupHandler](/api/csharp/yarn.unity/yarn.unity.iactionmarkuphandler.md) s along the way as needed.                                                              |
| [InterfaceContainer](/api/csharp/yarn.unity/yarn.unity.interfacecontainer.md)                                                 |                                                                                                                                                                                                                                                                                                                               |
| [LetterTypewriter](/api/csharp/yarn.unity/yarn.unity.lettertypewriter.md)                                                     | An implementation of [IAsyncTypewriter](/api/csharp/yarn.unity/yarn.unity.iasynctypewriter.md) that delivers characters one at a time, and invokes any [IActionMarkupHandler](/api/csharp/yarn.unity/yarn.unity.iactionmarkuphandler.md) s along the way as needed.                                                           |
| [LineAdvancer](/api/csharp/yarn.unity/yarn.unity.lineadvancer.md)                                                             | A dialogue presenter that listens for user input and sends requests to a [DialogueRunner](/api/csharp/yarn.unity/yarn.unity.dialoguerunner.md) to advance the presentation of the current line, either by asking a dialogue runner to hurry up its delivery, advance to the next line, or cancel the entire dialogue session. |
| [LineMetadata](/api/csharp/yarn.unity/yarn.unity.linemetadata.md)                                                             |                                                                                                                                                                                                                                                                                                                               |
| [LinePresenter](/api/csharp/yarn.unity/yarn.unity.linepresenter.md)                                                           | A Dialogue Presenter that presents lines of dialogue, using Unity UI elements.                                                                                                                                                                                                                                                |
| [LinePresenterButtonHandler](/api/csharp/yarn.unity/yarn.unity.linepresenterbuttonhandler.md)                                 |                                                                                                                                                                                                                                                                                                                               |
| [LineProviderBehaviour](/api/csharp/yarn.unity/yarn.unity.lineproviderbehaviour.md)                                           | A `UnityEngine.MonoBehaviour` that produces [LocalizedLine](/api/csharp/yarn.unity/yarn.unity.localizedline.md) s, for use in Dialogue Presenters.                                                                                                                                                                            |
| [Localization](/api/csharp/yarn.unity/yarn.unity.localization.md)                                                             |                                                                                                                                                                                                                                                                                                                               |
| [LocalizedLine](/api/csharp/yarn.unity/yarn.unity.localizedline.md)                                                           | Represents a line, ready to be presented to the user in the localisation they have specified.                                                                                                                                                                                                                                 |
| [MarkupPalette](/api/csharp/yarn.unity/yarn.unity.markuppalette.md)                                                           | Represents a collection of marker names and colours.                                                                                                                                                                                                                                                                          |
| [OptionItem](/api/csharp/yarn.unity/yarn.unity.optionitem.md)                                                                 |                                                                                                                                                                                                                                                                                                                               |
| [OptionsPresenter](/api/csharp/yarn.unity/yarn.unity.optionspresenter.md)                                                     | Receives options from a [DialogueRunner](/api/csharp/yarn.unity/yarn.unity.dialoguerunner.md) , and displays and manages a collection of [OptionItem](/api/csharp/yarn.unity/yarn.unity.optionitem.md) views for the user to choose from.                                                                                     |
| [PauseEventProcessor](/api/csharp/yarn.unity/yarn.unity.pauseeventprocessor.md)                                               | Allows pausing the current typewrite through \[pause/] markers.                                                                                                                                                                                                                                                               |
| [ReplacementMarkupHandler](/api/csharp/yarn.unity/yarn.unity.replacementmarkuphandler.md)                                     | An attribute marker processor receives a marker found in a Yarn line, and optionally rewrites the marker and its children into a new form.                                                                                                                                                                                    |
| [SerializableDictionary](/api/csharp/yarn.unity/yarn.unity.serializabledictionary-1.md)                                       |                                                                                                                                                                                                                                                                                                                               |
| [SerializableDictionary\<TKey, TValue>](/api/csharp/yarn.unity/yarn.unity.serializabledictionary-2.md)                        |                                                                                                                                                                                                                                                                                                                               |
| [SerializableDictionary\<TKey, TValue, TValueStorage>](/api/csharp/yarn.unity/yarn.unity.serializabledictionary-3.md)         |                                                                                                                                                                                                                                                                                                                               |
| [SerializableDictionaryBase](/api/csharp/yarn.unity/yarn.unity.serializabledictionarybase-1.md)                               |                                                                                                                                                                                                                                                                                                                               |
| [SerializableDictionaryBase\<TKey, TValue, TValueStorage>](/api/csharp/yarn.unity/yarn.unity.serializabledictionarybase-2.md) |                                                                                                                                                                                                                                                                                                                               |
| [StyleMarkerProcessor](/api/csharp/yarn.unity/yarn.unity.stylemarkerprocessor.md)                                             | An attribute marker processor that inserts TextMeshPro style tags where Yarn Spinner `[style]` tags appear in a line.                                                                                                                                                                                                         |
| [UnityEventString](/api/csharp/yarn.unity/yarn.unity.unityeventstring.md)                                                     | A `UnityEngine.Events.UnityEvent` that takes a single `string` parameter.                                                                                                                                                                                                                                                     |
| [VariableStorageBehaviour](/api/csharp/yarn.unity/yarn.unity.variablestoragebehaviour.md)                                     | A `UnityEngine.MonoBehaviour` that a [DialogueRunner](/api/csharp/yarn.unity/yarn.unity.dialoguerunner.md) uses to store and retrieve variables.                                                                                                                                                                              |
| [VoiceOverPresenter](/api/csharp/yarn.unity/yarn.unity.voiceoverpresenter.md)                                                 | A subclass of [DialoguePresenterBase](/api/csharp/yarn.unity/yarn.unity.dialoguepresenterbase.md) that plays voice-over `UnityEngine.AudioClip` s for lines of dialogue.                                                                                                                                                      |
| [WordTypewriter](/api/csharp/yarn.unity/yarn.unity.wordtypewriter.md)                                                         | An implementation of [IAsyncTypewriter](/api/csharp/yarn.unity/yarn.unity.iasynctypewriter.md) that delivers words one at a time, and invokes any [IActionMarkupHandler](/api/csharp/yarn.unity/yarn.unity.iactionmarkuphandler.md) s along the way as needed.                                                                |
| [YarnCommandAttribute](/api/csharp/yarn.unity/yarn.unity.yarncommandattribute.md)                                             | An attribute that marks a method on an object as a command.                                                                                                                                                                                                                                                                   |
| [YarnFunctionAttribute](/api/csharp/yarn.unity/yarn.unity.yarnfunctionattribute.md)                                           | Marks the method as a function to be registered with the running instance's library.                                                                                                                                                                                                                                          |
| [YarnProject](/api/csharp/yarn.unity/yarn.unity.yarnproject.md)                                                               |                                                                                                                                                                                                                                                                                                                               |
| [YarnTaskCompletionSource](/api/csharp/yarn.unity/yarn.unity.yarntaskcompletionsource-1.md)                                   |                                                                                                                                                                                                                                                                                                                               |
| [YarnTaskCompletionSource](/api/csharp/yarn.unity/yarn.unity.yarntaskcompletionsource-2.md)                                   |                                                                                                                                                                                                                                                                                                                               |
| [YarnTaskExtensions](/api/csharp/yarn.unity/yarn.unity.yarntaskextensions.md)                                                 |                                                                                                                                                                                                                                                                                                                               |

## Enums

| Name                                                                      | Description |
| ------------------------------------------------------------------------- | ----------- |
| [LocalizationType](/api/csharp/yarn.unity/yarn.unity.localizationtype.md) |             |
| [RegistrationType](/api/csharp/yarn.unity/yarn.unity.registrationtype.md) |             |

## Interfaces

| Name                                                                                        | Description                                                                                                                                                                                                  |
| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [IActionMarkupHandler](/api/csharp/yarn.unity/yarn.unity.iactionmarkuphandler.md)           | A [IActionMarkupHandler](/api/csharp/yarn.unity/yarn.unity.iactionmarkuphandler.md) is an object that reacts to the delivery of a line of dialogue, and can optionally control the timing of that delivery.  |
| [IActionRegistration](/api/csharp/yarn.unity/yarn.unity.iactionregistration.md)             | Contains methods that allow adding and removing Yarn commands and functions.                                                                                                                                 |
| [IAssetProvider](/api/csharp/yarn.unity/yarn.unity.iassetprovider.md)                       | Contains methods for accessing assets of a given type stored within an object.                                                                                                                               |
| [IAsyncTypewriter](/api/csharp/yarn.unity/yarn.unity.iasynctypewriter.md)                   | An object that can handle delivery of a line's text over time.                                                                                                                                               |
| [ICommand](/api/csharp/yarn.unity/yarn.unity.icommand.md)                                   |                                                                                                                                                                                                              |
| [IGeneratedVariableStorage](/api/csharp/yarn.unity/yarn.unity.igeneratedvariablestorage.md) | An interface that works with [GeneratedVariableStorageExtensions](/api/csharp/yarn.unity/yarn.unity.generatedvariablestorageextensions.md) to add helper methods used by generated variable storage classes. |
| [ILineProvider](/api/csharp/yarn.unity/yarn.unity.ilineprovider.md)                         | Contains methods for retrieving user-facing localized content, given non-localized line IDs.                                                                                                                 |
| [IYarnTask](/api/csharp/yarn.unity/yarn.unity.iyarntask.md)                                 |                                                                                                                                                                                                              |

## Namespaces

| Name                                                                        | Description                                                                       |
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [Yarn.Unity.Samples](/api/csharp/yarn.unity.samples.md)                     |                                                                                   |
| [Yarn.Unity.UnityLocalization](/api/csharp/yarn.unity.unitylocalization.md) | Contains classes for working with the Unity Localization system and Yarn Spinner. |

## Structs

| Name                                                                                | Description                                                                                               |
| ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| [Culture](/api/csharp/yarn.unity/yarn.unity.culture.md)                             | Holds information about a language.                                                                       |
| [LineCancellationToken](/api/csharp/yarn.unity/yarn.unity.linecancellationtoken.md) | A Line Cancellation Token stores information about whether a dialogue presenter should stop its delivery. |
| [StringTableEntry](/api/csharp/yarn.unity/yarn.unity.stringtableentry.md)           |                                                                                                           |
| [YarnTask](/api/csharp/yarn.unity/yarn.unity.yarntask-1.md)                         |                                                                                                           |
| [YarnTask](/api/csharp/yarn.unity/yarn.unity.yarntask-2.md)                         |                                                                                                           |
