All pages
Powered by GitBook
1 of 11

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

tags

Field in

The #hashtags present on the line.

public string[] tags = System.Array.Empty<string>();

Summary

LineMetadata

PrepareForLinesAsync(IEnumerable<string>,CancellationToken)

Method in UnityLocalisedLineProvider

Summary

Signals to the line provider that lines with the provided line IDs may be presented shortly.

public override YarnTask PrepareForLinesAsync(IEnumerable<string> lineIDs, CancellationToken cancellationToken)

Remarks

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.

Parameters

Name
Description

IEnumerable<string> lineIDs

Yarn.Unity.UnityLocalization Namespace

Summary

Contains classes for working with the Unity Localization system and Yarn Spinner.

Classes

Name
Description

Contains Yarn Spinner related metadata for Unity string table entries.

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.

A line provider that uses the Unity Localization system to get localized content for Yarn lines.

LineMetadata
UnityLocalisedLineProvider

LocaleCode

Property in

Gets the line provider's current locale identifier, as a BCP-47 code.

public override string LocaleCode { get; set; }

Summary

UnityLocalisedLineProvider

GetLocalizedLineAsync(Line,CancellationToken)

Method in UnityLocalisedLineProvider

Summary

Prepares and returns a LocalizedLine from the specified Line .

public override async YarnTask<LocalizedLine> GetLocalizedLineAsync(Line line, CancellationToken cancellationToken)

Parameters

Name
Description

line

The to produce the from.

A localized line, ready to be presented to the player.

CancellationToken cancellationToken

A cancellation token that indicates whether the process of fetching the localised version of line should be cancelled.

Returns

Yarn.Line
Line
LocalizedLine

ShadowLineSource

Property in

Gets the line ID indicated by any shadow tag contained in this metadata, if present.

public string? ShadowLineSource { get; }

Summary

LineMetadata

RegisterMarkerProcessor(string,IAttributeMarkerProcessor)

Method in UnityLocalisedLineProvider

Summary

Adds a new marker processor to the line provider.

public override void RegisterMarkerProcessor(string attributeName, IAttributeMarkerProcessor markerProcessor)

Parameters

Name
Description

string attributeName

The name of the markers to use markerProcessor for.

markerProcessor

The marker processor to add.

IAttributeMarkerProcessor

LineMetadata

Class in Yarn.Unity.UnityLocalization

Inherits from System.Object

Summary

Contains Yarn Spinner related metadata for Unity string table entries.

public class LineMetadata : IMetadata

Fields

Name
Description

Name
Description

The name of the Yarn node that this line came from.

The #hashtags present on the line.

Gets the line ID indicated by any shadow tag contained in this metadata, if present.

Properties

nodeName
tags
ShadowLineSource

nodeName

Field in

The name of the Yarn node that this line came from.

public string nodeName = "";

Summary

LineMetadata

DeregisterMarkerProcessor(string)

Method in

Removes all marker processors that handle markers named attributeName .

Name
Description
public override void DeregisterMarkerProcessor(string attributeName)

string attributeName

The name of the marker to remove processors for.

Summary

Parameters

UnityLocalisedLineProvider

UnityLocalisedLineProvider

Class in Yarn.Unity.UnityLocalization

Inherits from LineProviderBehaviour

Summary

A line provider that uses the Unity Localization system to get localized content for Yarn lines.

public sealed class UnityLocalisedLineProvider : LineProviderBehaviour

Methods

Name
Description

Removes all marker processors that handle markers named attributeName .

Name
Description

Prepares and returns a from the specified .

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.

Gets the line provider's current locale identifier, as a BCP-47 code.

Properties

DeregisterMarkerProcessor(string)
GetLocalizedLineAsync(Line,CancellationToken)
LocalizedLine
Line
PrepareForLinesAsync(IEnumerable,CancellationToken)
RegisterMarkerProcessor(string,IAttributeMarkerProcessor)
LocaleCode