Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Method in LineProviderBehaviour
Signals to the line provider that lines with the provided line IDs may be presented shortly.
Subclasses of LineProviderBehaviour can override this to prepare any neccessary resources needed to present these lines, like pre-loading voice-over audio. The default implementation does nothing.
Not every line may run; this method serves as a way to give the line provider advance notice that a line may run, not will run.
When this method is run, the value returned by the LinesAvailable property should change to false until the necessary resources have loaded.
Name | Description |
---|---|
System.Collections.Generic.IEnumerable<string>
lineIDs
A collection of line IDs that the line provider should prepare for.
Method in LineProviderBehaviour
Prepares and returns a LocalizedLine from the specified Line .
This method should not be called if LinesAvailable returns false
.
A localized line, ready to be presented to the player.
Name | Description |
---|---|
Yarn.Line line
The Line to produce the LocalizedLine from.
Property in LineProviderBehaviour
Gets a value indicating whether this line provider is ready to provide LocalizedLine objects. The default implementation returns true
.
Subclasses should return false
when the required resources needed to deliver lines are not yet ready, and true
when they are.
Class in Yarn.Unity
Inherits from UnityEngine.MonoBehaviour
A UnityEngine.MonoBehaviour
that produces LocalizedLine s, for use in Dialogue Views.
DialogueRunners use a LineProviderBehaviour to get LocalizedLines, which contain the localized information that DialogueViewBase classes use to present content to the player.
Subclasses of this abstract class may return subclasses of LocalizedLine. For example, AudioLineProvider returns an AudioLocalizedLine
, which includes UnityEngine.AudioClip
; views that make use of audio can then access this additional data.
DialogueViewBase: A UnityEngine.MonoBehaviour
that can present lines and options to the user, when it receives them from a DialogueRunner .
Name | Description |
---|---|
Name | Description |
---|---|
Prepares and returns a LocalizedLine from the specified Line .
Signals to the line provider that lines with the provided line IDs may be presented shortly.
Called by Unity when the LineProviderBehaviour has first appeared in the scene.
Gets a value indicating whether this line provider is ready to provide LocalizedLine objects. The default implementation returns true
.
Gets the user's current locale identifier, as a BCP-47 code.
Method in LineProviderBehaviour
Called by Unity when the LineProviderBehaviour has first appeared in the scene.
This method is public
virtual
to allow subclasses to override it.
Property in LineProviderBehaviour
Gets the user's current locale identifier, as a BCP-47 code.
This value is used by the DialogueRunner to control how certain replacement markers behave (for example, the [plural]
marker, which behaves differently depending on the user's locale.)