# LineAdvancer

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

Inherits from [`DialoguePresenterBase`](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.dialoguepresenterbase)

## Summary

A dialogue presenter that listens for user input and sends requests to a [DialogueRunner](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.dialoguerunner) 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.

```csharp
public sealed class LineAdvancer : DialoguePresenterBase, IActionMarkupHandler
```

## Enums

| Name                                                                                                                          | Description                                            |
| ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| [InputMode](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.lineadvancer/yarn.unity.lineadvancer.inputmode) | The type of input that this line advancer responds to. |

## Fields

| Name                                                                                                                                                                              | Description                                                                                                                               |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| [advanceRequestsBeforeCancellingLine](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.lineadvancer/yarn.unity.lineadvancer.advancerequestsbeforecancellingline) | The number of times that a 'hurry up' signal occurs before the line advancer requests that the next line be shown.                        |
| [multiAdvanceIsCancel](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.lineadvancer/yarn.unity.lineadvancer.multiadvanceiscancel)                               | If `true` , repeatedly signalling that the line should be hurried up will cause the line advancer to request that the next line be shown. |

## Methods

| Name                                                                                                                                                                                           | Description                                                                                                         |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [OnCharacterWillAppear(int,MarkupParseResult,CancellationToken)](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.lineadvancer/yarn.unity.lineadvancer.oncharacterwillappear) |                                                                                                                     |
| [OnDialogueCompleteAsync()](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.lineadvancer/yarn.unity.lineadvancer.ondialoguecompleteasync)                                    | Called by a dialogue runner when dialogue ends to remove the input action handlers.                                 |
| [OnDialogueStartedAsync()](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.lineadvancer/yarn.unity.lineadvancer.ondialoguestartedasync)                                      | Called by a dialogue runner when dialogue starts to add input action handlers for advancing the line.               |
| [OnLineDisplayBegin(MarkupParseResult,TMP\_Text)](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.lineadvancer/yarn.unity.lineadvancer.onlinedisplaybegin)                   |                                                                                                                     |
| [OnLineDisplayComplete()](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.lineadvancer/yarn.unity.lineadvancer.onlinedisplaycomplete)                                        |                                                                                                                     |
| [OnLineWillDismiss()](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.lineadvancer/yarn.unity.lineadvancer.onlinewilldismiss)                                                |                                                                                                                     |
| [OnPrepareForLine(MarkupParseResult,TMP\_Text)](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.lineadvancer/yarn.unity.lineadvancer.onprepareforline)                       |                                                                                                                     |
| [RequestDialogueCancellation()](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.lineadvancer/yarn.unity.lineadvancer.requestdialoguecancellation)                            | Requests that the dialogue runner to instruct all line views to dismiss their content, and then stops the dialogue. |
| [RequestLineHurryUp()](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.lineadvancer/yarn.unity.lineadvancer.requestlinehurryup)                                              | Requests that the line be hurried up.                                                                               |
| [RequestNextLine()](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.lineadvancer/yarn.unity.lineadvancer.requestnextline)                                                    | Requests that the dialogue runner proceeds to the next line.                                                        |
| [RequestOptionHurryUp()](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.lineadvancer/yarn.unity.lineadvancer.requestoptionhurryup)                                          |                                                                                                                     |
| [RunLineAsync(LocalizedLine,LineCancellationToken)](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.lineadvancer/yarn.unity.lineadvancer.runlineasync)                       | Called by a dialogue presenter to signal that a line is running.                                                    |
| [RunOptionsAsync(DialogueOption\[\],LineCancellationToken)](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.unity/yarn.unity.lineadvancer/yarn.unity.lineadvancer.runoptionsasync)            | Called by a dialogue presenter to signal that options are running.                                                  |
