Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Field in VoiceOverView
The amount of time after playback has completed before this view reports that it's finished delivering the line.
Class in Yarn.Unity
Inherits from AsyncDialogueViewBase
A subclass of AsyncDialogueViewBase that plays voice-over UnityEngine.AudioClip
s for lines of dialogue.
The UnityEngine.AudioSource
that this voice over view will play its audio from.
The dialogue runner to notify of line completion.
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.
The fade out time when the line is interrupted during playback.
The amount of time after playback has completed before this view reports that it's finished delivering the line.
The amount of time to wait before starting playback of the line.
Begins playing the associated audio for the specified line.
DialogueViewBase: Implements the Yarn Spinner 2 callback-based API for dialogue views using Yarn Spinner 3.
Method in
Called by the to signal that the dialogue has ended, and no more lines will be delivered.
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.
A task that represents any work done by this dialogue view in order to clean up after running dialogue.
Called by the to signal that the dialogue has ended, and no more lines will be delivered.
Called by the to signal that dialogue has started.
Called by the to signal that a set of options should be displayed to the user.
Method in VoiceOverView
Called by the DialogueRunner to signal that dialogue has started.
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.
A task that represents any work done by this dialogue view in order to get ready for dialogue to run.
Method in VoiceOverView
Called by the DialogueRunner to signal that a set of options should be displayed to the user.
This method is called when the Dialogue Runner wants to show a collection of options that the user should choose from. Each option is represented by a DialogueOption object, which contains information about the option.
When this method is called, the Dialogue View should display appropriate user interface elements that let the user choose among the options.
This method should await until an option is selected, and then return the selected option. If this view doesn't handle options, or is otherwise unable to select an option, it should return YarnAsync.NoOptionSelected
. The dialogue runner will wait for all dialogue views to return, so if a dialogue view doesn't or can't handle options, it's good practice to return as soon as possible.
If the cancellationToken
becomes cancelled, this means that the dialogue runner no longer needs this dialogue view to make a selection, and this method should return as soon as possible; its return value will not be used.
The default implementation of this method returns YarnAsync.NoOptionSelected
.
The set of options that should be displayed to the user.
CancellationToken
cancellationToken
A System.Threading.CancellationToken
that becomes cancelled when the dialogue runner no longer needs this dialogue view to return an option.
A task that indicates which option was selected, or that this dialogue view did not select an option.
AsyncDialogueViewBase.RunLineAsync(LocalizedLine,LineCancellationToken): Called by the DialogueRunner to signal that a line should be displayed to the user.
YarnAsync.NoOptionSelected
Method in VoiceOverView
Begins playing the associated audio for the specified line.
This method is not intended to be called from your code. Instead, the DialogueRunner class will call it at the appropriate time.
line
The line to present.
token
A that represents whether the dialogue view should hurry it its presentation of the line, or stop showing the current line.
dialogueLine
lineCancellationToken
AsyncDialogueViewBase.RunLineAsync(LocalizedLine,LineCancellationToken): Called by the DialogueRunner to signal that a line should be displayed to the user.
dialogueOptions