UnityLocalisedLineProvider
public sealed class UnityLocalisedLineProvider : LineProviderBehaviourInherits from Yarn.Unity.LineProviderBehaviour
Implements Yarn.Unity.ILineProvider
#Properties
#LocaleCode
public override string LocaleCode { get; set; }Type String
#Methods
#DeregisterMarkerProcessor(string)
attributeName.public override void DeregisterMarkerProcessor(string attributeName)Parameters
attributeNamestringThe name of the marker to remove processors for.
#GetLocalizedLineAsync(Line, CancellationToken)
public override async YarnTask<LocalizedLine> GetLocalizedLineAsync(Line line, CancellationToken cancellationToken)Parameters
lineYarn.LineThe Line to produce the LocalizedLine from.cancellationTokenCancellationTokenA cancellation token that indicates whether the process of fetching the localised version oflineshould be cancelled.
Returns YarnTask: A localized line, ready to be presented to the
player.
#PrepareForLinesAsync(IEnumerable<string>, CancellationToken)
public override YarnTask PrepareForLinesAsync(IEnumerable<string> lineIDs, CancellationToken cancellationToken)Parameters
lineIDsIEnumerable<string>A collection of line IDs that the line provider should prepare for.cancellationTokenCancellationTokenA cancellation token that indicates whether the operation should be cancelled.
Returns YarnTask
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.
#RegisterMarkerProcessor(string, IAttributeMarkerProcessor)
public override void RegisterMarkerProcessor(string attributeName, IAttributeMarkerProcessor markerProcessor)Parameters
attributeNamestringThe name of the markers to usemarkerProcessorfor.markerProcessorIAttributeMarkerProcessorThe marker processor to add.
Generated from Yarn Spinner for Unity 3.3.