VoiceOverPresenter
AudioClips for lines of dialogue.public sealed class VoiceOverPresenter : DialoguePresenterBaseInherits from Yarn.Unity.DialoguePresenterBase
#Fields
#audioSource
AudioSource that this voice over view will play
its audio from.public AudioSource audioSource;Type AudioSource
null, a new AudioSource will be added at runtime.#endLineWhenVoiceoverComplete
true, the voice over view will request that the
dialogue runner proceed to the next line when audio for the line has
finished playing.public bool endLineWhenVoiceoverComplete = true;Type Boolean
#fadeOutTimeOnLineFinish
public float fadeOutTimeOnLineFinish = 0.05f;Type Single
#waitTimeAfterLineComplete
public float waitTimeAfterLineComplete = 0f;Type Single
#waitTimeBeforeLineStart
public float waitTimeBeforeLineStart = 0f;Type Single
#Methods
#OnDialogueCompleteAsync(CancellationToken)
public override YarnTask OnDialogueCompleteAsync(CancellationToken token)Parameters
tokenCancellationTokenThe cancellation token for this task, if cancelled this method should finish as soon as possible.
Returns YarnTask: A task that represents any work done by this dialogue presenter in order to clean up after running dialogue.
This method is called after the last piece of content (that is, lines, options or commands) finished running.
This method is a good place to perform tasks like dismissing on-screen dialogue UI (for example, turning off a letterboxing effect, or hiding dialogue UI elements.)
The default implementation of this method does nothing.
#OnDialogueStartedAsync(CancellationToken)
public override YarnTask OnDialogueStartedAsync(CancellationToken token)Parameters
tokenCancellationTokenThe cancellation token for this task, if cancelled this method should finish as soon as possible.
Returns YarnTask: A task that represents any work done by this dialogue presenter in order to get ready for dialogue to run.
This method is called before any content (that is, lines, options or commands) are delivered.
This method is a good place to perform tasks like preparing on-screen dialogue UI (for example, turning on a letterboxing effect, or making dialogue UI elements visible.)
The default implementation of this method does nothing.
#RunLineAsync(LocalizedLine, LineCancellationToken)
public override async YarnTask RunLineAsync(LocalizedLine dialogueLine, LineCancellationToken lineCancellationToken)Parameters
line(unknown)The line to present.token(unknown)A LineCancellationToken that represents whether the dialogue presenter should hurry it its presentation of the line, or stop showing the current line.dialogueLineYarn.Unity.LocalizedLinelineCancellationTokenYarn.Unity.LineCancellationToken
Returns YarnTask
This method is not intended to be called from your code. Instead, the DialogueRunner class will call it at the appropriate time.
See also
Generated from Yarn Spinner for Unity 3.3.