Class in Yarn.Unity
Inherits from UnityEngine.MonoBehaviour
A UnityEngine.MonoBehaviour
that produces LocalizedLine s, for use in Dialogue Views.
DialogueRunner s use a LineProviderBehaviour to get LocalizedLine s, which contain the localized information that is presented to the player through dialogue views.
Removes all marker processors that handle markers named attributeName
.
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.
Adds a new marker processor to the line provider.
Called by Unity when the LineProviderBehaviour has first appeared in the scene.
Gets the user's current locale identifier, as a BCP-47 code.
The YarnProject that contains the localized data for lines.
DialogueViewBase: Implements the Yarn Spinner 2 callback-based API for dialogue views using Yarn Spinner 3.
Method in LineProviderBehaviour
Removes all marker processors that handle markers named attributeName
.
string
attributeName
The name of the marker to remove processors for.
Method in LineProviderBehaviour
Prepares and returns a LocalizedLine from the specified Line .
Line line
The Line to produce the LocalizedLine from.
CancellationToken
cancellationToken
A cancellation token that indicates whether the process of fetching the localised version of line
should be cancelled.
A localized line, ready to be presented to the player.
Method in LineProviderBehaviour
Signals to the line provider that lines with the provided line IDs may be presented shortly.
This method allows implementing classes a chance 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.
IEnumerable<string>
lineIDs
A collection of line IDs that the line provider should prepare for.
CancellationToken
cancellationToken
A cancellation token that indicates whether the operation should be cancelled.
Method in LineProviderBehaviour
Adds a new marker processor to the line provider.
string
attributeName
The name of the markers to use markerProcessor
for.
IAttributeMarkerProcessor markerProcessor
The marker processor to add.
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 to control how certain replacement markers behave (for example, the [plural]
marker, which behaves differently depending on the user's locale.)
Property in LineProviderBehaviour
The YarnProject that contains the localized data for lines.
This property is set at run-time by the object that will be requesting content (typically a DialogueRunner ).