Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Method in DialogueViewBase
Called by the DialogueRunner to signal that the end of a node has been reached.
This method may be called multiple times before DialogueComplete() is called. If this method returns Dialogue.HandlerExecutionType.ContinueExecution
, do not call the onComplete
method.
The default implementation does nothing.
Name | Description |
---|---|
string
nextNode
The name of the next node that is being entered.
Action
onComplete
A method that should be called to /// indicate that the DialogueRunner should continue executing.
Method in DialogueViewBase
Called by the DialogueRunner to signal that the dialogue has ended, and no more lines will be delivered.
The default implementation does nothing.
Method in DialogueViewBase
Called by the DialogueRunner to signal that the view should dismiss its current line from display, and clean up.
Name | Description |
---|---|
Method in DialogueViewBase
Called by the DialogueRunner to indicate that the line that this view is delivering has changed state.
Subclasses of DialogueViewBase should override this method to be notified when a line has become interrupted, and when the line has finished being delivered by all views.
The default implementation does nothing.
Name | Description |
---|---|
LineStatus: The presentation status of a LocalizedLine .
Class in Yarn.Unity
Inherits from MonoBehaviour
A MonoBehaviour
that can present the data of a dialogue executed by a DialogueRunner to the user. The DialogueRunner uses subclasses of this type to relay information to and from the user, and to pause and resume the execution of the YarnScript
.
The term "view" is meant in the broadest sense, e.g. a view on the dialogue (MVVM pattern). Therefore, this abstract class only defines how a specific view on the dialogue should communicate with the DialogueRunner (e.g. display text or trigger a voice over clip). How to present the content to the user will be the responsibility of all classes inheriting from this class.
The inheriting classes will receive a LocalizedLine and can be in one of the stages defined in DialogueLineStatus
while presenting it.
Name | Description |
---|---|
DialogueRunner.dialogueViews: The View classes that will present the dialogue to the user.
DialogueUI
Method in
Signals that the user wants to go to the next line.
This method is generally called by a "continue" button, and causes the DialogueUI to signal the to proceed to the next piece of content.
If this method is called before the line has finished appearing (that is, before the line's status changes to ), the line's status will change to , and will be called to notify the view.
Action
onDismissalComplete
The method that should be called when the view has finished dismissing the line.
Yarn.Unity.LocalizedLine dialogueLine
The LocalizedLine that has changed state.
Called by the DialogueRunner to signal that the dialogue has ended, and no more lines will be delivered.
Signals that a conversation has started.
Called by the DialogueRunner to signal that the view should dismiss its current line from display, and clean up.
Called by the DialogueRunner to signal that the end of a node has been reached.
Called by the DialogueRunner to indicate that the line that this view is delivering has changed state.
Signals that the user wants to go to the next line.
Called by the DialogueRunner to signal that a line should be displayed to the user.
Called by the DialogueRunner to signal that a set of options should be displayed to the user.
Method in DialogueViewBase
Called by the DialogueRunner to signal that a line should be displayed to the user.
Name | Description |
---|---|
Yarn.Unity.LocalizedLine dialogueLine
The content of the line that should be presented to the user.
Action
onDialogueLineFinished
The method that should be called after the line has been finished.
Method in DialogueViewBase
Called by the DialogueRunner to signal that a set of options should be displayed to the user.
When this method is called, the DialogueRunner will pause execution until the `onOptionSelected` method is called.
If your scene includes multiple dialogue views that override this method, they will all receive a call each time the dialogue system presents options to the player. You must ensure that only one of them calls the onOptionSelected
method.
Name | Description |
---|---|
Yarn.Unity.DialogueOption[] dialogueOptions
The set of options that should be displayed to the user.
Action<int>
onOptionSelected
A method that should be called when the user has made a selection.