# VoiceOverPresenter

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

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

## Summary

A subclass of [DialoguePresenterBase](https://docs.yarnspinner.dev/api/csharp/yarn.unity/yarn.unity.dialoguepresenterbase) that plays voice-over `UnityEngine.AudioClip` s for lines of dialogue.

```csharp
public sealed class VoiceOverPresenter : DialoguePresenterBase
```

## Fields

| Name                                                                                                                                                                        | Description                                                                                                                                  |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| [audioSource](https://docs.yarnspinner.dev/api/csharp/yarn.unity/yarn.unity.voiceoverpresenter/yarn.unity.voiceoverpresenter.audiosource)                                   | The `UnityEngine.AudioSource` that this voice over view will play its audio from.                                                            |
| [endLineWhenVoiceoverComplete](https://docs.yarnspinner.dev/api/csharp/yarn.unity/yarn.unity.voiceoverpresenter/yarn.unity.voiceoverpresenter.endlinewhenvoiceovercomplete) | If `true` , the voice over view will request that the dialogue runner proceed to the next line when audio for the line has finished playing. |
| [fadeOutTimeOnLineFinish](https://docs.yarnspinner.dev/api/csharp/yarn.unity/yarn.unity.voiceoverpresenter/yarn.unity.voiceoverpresenter.fadeouttimeonlinefinish)           | The fade out time when the line is interrupted during playback.                                                                              |
| [waitTimeAfterLineComplete](https://docs.yarnspinner.dev/api/csharp/yarn.unity/yarn.unity.voiceoverpresenter/yarn.unity.voiceoverpresenter.waittimeafterlinecomplete)       | The amount of time after playback has completed before this view reports that it's finished delivering the line.                             |
| [waitTimeBeforeLineStart](https://docs.yarnspinner.dev/api/csharp/yarn.unity/yarn.unity.voiceoverpresenter/yarn.unity.voiceoverpresenter.waittimebeforelinestart)           | The amount of time to wait before starting playback of the line.                                                                             |

## Methods

| Name                                                                                                                                                                             | Description                                                                                                                                                                              |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [OnDialogueCompleteAsync()](https://docs.yarnspinner.dev/api/csharp/yarn.unity/yarn.unity.voiceoverpresenter/yarn.unity.voiceoverpresenter.ondialoguecompleteasync)              | Called by the [DialogueRunner](https://docs.yarnspinner.dev/api/csharp/yarn.unity/yarn.unity.dialoguerunner) to signal that the dialogue has ended, and no more lines will be delivered. |
| [OnDialogueStartedAsync()](https://docs.yarnspinner.dev/api/csharp/yarn.unity/yarn.unity.voiceoverpresenter/yarn.unity.voiceoverpresenter.ondialoguestartedasync)                | Called by the [DialogueRunner](https://docs.yarnspinner.dev/api/csharp/yarn.unity/yarn.unity.dialoguerunner) to signal that dialogue has started.                                        |
| [RunLineAsync(LocalizedLine,LineCancellationToken)](https://docs.yarnspinner.dev/api/csharp/yarn.unity/yarn.unity.voiceoverpresenter/yarn.unity.voiceoverpresenter.runlineasync) | Begins playing the associated audio for the specified line.                                                                                                                              |
