# RunOptionsAsync(DialogueOption\[],LineCancellationToken)

Method in [OptionsPresenter](/api/csharp/yarn.unity/yarn.unity.optionspresenter.md)

## Summary

Called by a [DialogueRunner](/api/csharp/yarn.unity/yarn.unity.dialoguerunner.md) to display a collection of options to the user.

```csharp
public override async YarnTask<DialogueOption?> RunOptionsAsync(DialogueOption[] dialogueOptions, LineCancellationToken cancellationToken)
```

## Parameters

| Name                                                                                                             | Description                                                                                                                                         |
| ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Yarn.Unity.DialogueOption\[\]](/api/csharp/yarn.unity/yarn.unity.dialogueoption.md) dialogueOptions             | The set of options that should be displayed to the user.                                                                                            |
| [Yarn.Unity.LineCancellationToken](/api/csharp/yarn.unity/yarn.unity.linecancellationtoken.md) cancellationToken | A `System.Threading.CancellationToken` that becomes cancelled when the dialogue runner no longer needs this dialogue presenter to return an option. |

## Returns

A task that indicates which option was selected, or that this dialogue presenter did not select an option.


---

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