VoiceOverPresenter

Class in Yarn.Unity

Inherits from DialoguePresenterBase

Summary

A subclass of DialoguePresenterBase that plays voice-over UnityEngine.AudioClip s for lines of dialogue.

public sealed class VoiceOverPresenter : DialoguePresenterBase

Fields

NameDescription
audioSourceThe UnityEngine.AudioSource that this voice over view will play its audio from.
endLineWhenVoiceoverCompleteIf true , the voice over view will request that the dialogue runner proceed to the next line when audio for the line has finished playing.
fadeOutTimeOnLineFinishThe fade out time when the line is interrupted during playback.
waitTimeAfterLineCompleteThe amount of time after playback has completed before this view reports that it’s finished delivering the line.
waitTimeBeforeLineStartThe amount of time to wait before starting playback of the line.

Methods

NameDescription
OnDialogueCompleteAsync()Called by the DialogueRunner to signal that the dialogue has ended, and no more lines will be delivered.
OnDialogueStartedAsync()Called by the DialogueRunner to signal that dialogue has started.
RunLineAsync(LocalizedLine,LineCancellationToken)Begins playing the associated audio for the specified line.