All pages
Powered by GitBook
1 of 3

Loading...

Loading...

Loading...

Line Provider

Line Providers are components that are responsible for taking the Line objects that the Dialogue Runner produces, and fetches the appropriate localised content for that line. Line Providers produce LocalizedLine objects, which are sent to the Dialogue Runner's Dialogue Presenters.

When a Yarn Spinner Script runs, the Dialogue Runner produces Line objects. These objects contain information about the line, but not the text of the line itself. This is because it's the responsibility of the game to load the user-facing parts of the line, including the text of the line in the player's current language setting, as well as any other assets that may be needed to present the line, such as audio files for voiceover.

Yarn Spinner comes with two built-in types of line providers:

  • Built-In Localised Line Provider is a Line Provider that uses Yarn Spinner's built-in localisation system.

  • is a Line Provider that fetches the text and any localised assets from .

If you don't set up a Line Provider for a Dialogue Runner, it will automatically create a Buit-In Localised Line Provider, and configure it to use the user's current language.

Unity Localised Line Provider

Unity Localised Line Provider is a Line Provider that fetches localized text and assets for a line of dialogue from a String Table and optionally from an Asset Table, based on the project's current localization settings.

Use this Line Provider if you are using the system. If you are using the system, use the instead.

Built-in Localised Line Provider

The Built-in Localised Line Provider is a Line Provider that fetches localized text or audio assets (AudioClip) for a line of dialogue, given the user's language.

The Built-in Localised Line Provider will automatically use Addressable Assets, if the Addressables package is installed in your Unity project and the is configured to use Addressable Assets.

You'll automatically use this Line Provider if you are using the system. If you are using the system, use the instead.

Unity Localised Line provider
Unity's Localization system
Inspector
Property
Description

Text Language Code

The language that the Built-in Localised Line Provider should use to fetch localised text for.

Audio Language

The language that the Built-in Localised Line Provider should use to fetch localised audio clips for.

Yarn Project
Built-In Localisation
Unity Localisation
Unity Localised Line Provider
A Built-in Localied Line Provider
Inspector
Property
Description

Strings Table

The String Table Collection containing localised line text. See to learn how to populate it with your project's dialogue.

Assets Table

(Optional) The Asset Table Collection containing localised assets. If an Asset Table is provided, then the Unity Localised Line Provider will fetch localised assets for each line, based on the line's ID.

Unity Localisation
Built-In Localisation
Built-In Localised Provider
Unity Localization