# OptionsPresenter

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

Inherits from [`DialoguePresenterBase`](/3.1/api/csharp/yarn.unity/yarn.unity.dialoguepresenterbase.md)

## Summary

Receives options from a [DialogueRunner](/3.1/api/csharp/yarn.unity/yarn.unity.dialoguerunner.md) , and displays and manages a collection of [OptionItem](/3.1/api/csharp/yarn.unity/yarn.unity.optionitem.md) views for the user to choose from.

```csharp
public sealed class OptionsPresenter : DialoguePresenterBase
```

## Fields

| Name                                                                                                                                   | Description                                                                                                                                                                       |
| -------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [fadeDownDuration](/3.1/api/csharp/yarn.unity/yarn.unity.optionspresenter/yarn.unity.optionspresenter.fadedownduration.md)             |                                                                                                                                                                                   |
| [fadeUpDuration](/3.1/api/csharp/yarn.unity/yarn.unity.optionspresenter/yarn.unity.optionspresenter.fadeupduration.md)                 |                                                                                                                                                                                   |
| [showUnavailableOptions](/3.1/api/csharp/yarn.unity/yarn.unity.optionspresenter/yarn.unity.optionspresenter.showunavailableoptions.md) | Controls whether or not to display options whose [IsAvailable](/3.1/api/csharp/yarn/yarn.optionset/yarn.optionset.option/yarn.optionset.option.isavailable.md) value is `false` . |
| [useFadeEffect](/3.1/api/csharp/yarn.unity/yarn.unity.optionspresenter/yarn.unity.optionspresenter.usefadeeffect.md)                   |                                                                                                                                                                                   |

## Methods

| Name                                                                                                                                                               | Description                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [OnDialogueCompleteAsync()](/3.1/api/csharp/yarn.unity/yarn.unity.optionspresenter/yarn.unity.optionspresenter.ondialoguecompleteasync.md)                         | Called by a [DialogueRunner](/3.1/api/csharp/yarn.unity/yarn.unity.dialoguerunner.md) to dismiss the options view when dialogue is complete.                                                                      |
| [OnDialogueStartedAsync()](/3.1/api/csharp/yarn.unity/yarn.unity.optionspresenter/yarn.unity.optionspresenter.ondialoguestartedasync.md)                           | Called by a [DialogueRunner](/3.1/api/csharp/yarn.unity/yarn.unity.dialoguerunner.md) to set up the options view when dialogue begins.                                                                            |
| [RunLineAsync(LocalizedLine,LineCancellationToken)](/3.1/api/csharp/yarn.unity/yarn.unity.optionspresenter/yarn.unity.optionspresenter.runlineasync.md)            | Called by a [DialogueRunner](/3.1/api/csharp/yarn.unity/yarn.unity.dialoguerunner.md) when a line needs to be presented, and stores the line as the 'last seen line' so that it can be shown when options appear. |
| [RunOptionsAsync(DialogueOption\[\],LineCancellationToken)](/3.1/api/csharp/yarn.unity/yarn.unity.optionspresenter/yarn.unity.optionspresenter.runoptionsasync.md) | Called by a [DialogueRunner](/3.1/api/csharp/yarn.unity/yarn.unity.dialoguerunner.md) to display a collection of options to the user.                                                                             |


---

# 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/3.1/api/csharp/yarn.unity/yarn.unity.optionspresenter.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.
