# LinePresenter

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

A Dialogue Presenter that presents lines of dialogue, using Unity UI elements.

```csharp
public sealed class LinePresenter : DialoguePresenterBase
```

## Fields

| Name                                                                                                                               | Description                                                                                                                                                                               |
| ---------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [autoAdvance](/3.1/api/csharp/yarn.unity/yarn.unity.linepresenter/yarn.unity.linepresenter.autoadvance.md)                         | Controls whether this Line View will automatically to the Dialogue Runner that the line is complete as soon as the line has finished appearing.                                           |
| [autoAdvanceDelay](/3.1/api/csharp/yarn.unity/yarn.unity.linepresenter/yarn.unity.linepresenter.autoadvancedelay.md)               | The amount of time after the line finishes appearing before automatically ending the line, in seconds.                                                                                    |
| [canvasGroup](/3.1/api/csharp/yarn.unity/yarn.unity.linepresenter/yarn.unity.linepresenter.canvasgroup.md)                         | The canvas group that contains the UI elements used by this Line View.                                                                                                                    |
| [characterNameContainer](/3.1/api/csharp/yarn.unity/yarn.unity.linepresenter/yarn.unity.linepresenter.characternamecontainer.md)   | The game object that holds the [characterNameText](/3.1/api/csharp/yarn.unity/yarn.unity.linepresenter/yarn.unity.linepresenter.characternametext.md) text field.                         |
| [characterNameText](/3.1/api/csharp/yarn.unity/yarn.unity.linepresenter/yarn.unity.linepresenter.characternametext.md)             | The `TMPro.TMP_Text` object that displays the character names found in dialogue lines.                                                                                                    |
| [customTypewriter](/3.1/api/csharp/yarn.unity/yarn.unity.linepresenter/yarn.unity.linepresenter.customtypewriter.md)               |                                                                                                                                                                                           |
| [fadeDownDuration](/3.1/api/csharp/yarn.unity/yarn.unity.linepresenter/yarn.unity.linepresenter.fadedownduration.md)               | The time that the fade effect will take to fade lines out.                                                                                                                                |
| [fadeUpDuration](/3.1/api/csharp/yarn.unity/yarn.unity.linepresenter/yarn.unity.linepresenter.fadeupduration.md)                   | The time that the fade effect will take to fade lines in.                                                                                                                                 |
| [lettersPerSecond](/3.1/api/csharp/yarn.unity/yarn.unity.linepresenter/yarn.unity.linepresenter.letterspersecond.md)               | The number of characters per second that should appear during a typewriter effect.                                                                                                        |
| [lineText](/3.1/api/csharp/yarn.unity/yarn.unity.linepresenter/yarn.unity.linepresenter.linetext.md)                               | The `TMPro.TMP_Text` object that displays the text of dialogue lines.                                                                                                                     |
| [showCharacterNameInLine](/3.1/api/csharp/yarn.unity/yarn.unity.linepresenter/yarn.unity.linepresenter.showcharacternameinline.md) | Controls whether the [lineText](/3.1/api/csharp/yarn.unity/yarn.unity.linepresenter/yarn.unity.linepresenter.linetext.md) object will show the character name present in the line or not. |
| [useFadeEffect](/3.1/api/csharp/yarn.unity/yarn.unity.linepresenter/yarn.unity.linepresenter.usefadeeffect.md)                     | Controls whether the line view should fade in when lines appear, and fade out when lines disappear.                                                                                       |
| [wordsPerSecond](/3.1/api/csharp/yarn.unity/yarn.unity.linepresenter/yarn.unity.linepresenter.wordspersecond.md)                   |                                                                                                                                                                                           |

## Methods

| Name                                                                                                                                              | Description                                                                                                                                                         |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [OnDialogueCompleteAsync()](/3.1/api/csharp/yarn.unity/yarn.unity.linepresenter/yarn.unity.linepresenter.ondialoguecompleteasync.md)              | Called by the [DialogueRunner](/3.1/api/csharp/yarn.unity/yarn.unity.dialoguerunner.md) to signal that the dialogue has ended, and no more lines will be delivered. |
| [OnDialogueStartedAsync()](/3.1/api/csharp/yarn.unity/yarn.unity.linepresenter/yarn.unity.linepresenter.ondialoguestartedasync.md)                | Called by the [DialogueRunner](/3.1/api/csharp/yarn.unity/yarn.unity.dialoguerunner.md) to signal that dialogue has started.                                        |
| [RunLineAsync(LocalizedLine,LineCancellationToken)](/3.1/api/csharp/yarn.unity/yarn.unity.linepresenter/yarn.unity.linepresenter.runlineasync.md) | Presents a line using the configured text view.                                                                                                                     |


---

# 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.linepresenter.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.
