DialogueViewBase

Class in Yarn.Unity

Inherits from MonoBehaviour

Summary

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 .

public abstract class DialogueViewBase : MonoBehaviour

Remarks

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.

Methods

NameDescription

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.

See Also

Last updated

Yarn Spinner® and Secret Lab® are trade marks of Secret Lab Pty. Ltd., and are used by Yarn Spinner Pty. Ltd. under license.