All pages
Powered by GitBook
1 of 15

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

localizedAsset

Field in LocalizationTableEntry

Summary

public UnityEngine.Object? localizedAsset;

GetLineIDs()

Method in Localization

Summary

Gets the line IDs present in this localization.

public IEnumerable<string> GetLineIDs()

Remarks

The line IDs can be used to access the localized text or asset associated with a line.

Returns

The line IDs.

AddLocalizedStrings(IEnumerable<StringTableEntry>)

Method in Localization

Summary

Adds a collection of strings to the runtime string table.

public void AddLocalizedStrings(IEnumerable<StringTableEntry> stringTableEntries)

Remarks

This method updates the localisation's runtime string table, which is useful for adding or changing the localisation during gameplay or in a built player. It doesn't modify the asset on disk, and any changes made will be lost when gameplay ends.

Parameters

Name
Description

strings

LocalizationTableEntry

Class in

Inherits from System.Object

Name
Description

ContainsLocalizedString(string)

Method in

Returns a boolean value indicating whether this contains a string with the given key.

Name
Description

true

Clear()

Method in

AddLocalizedString(string,string)

Method in

Adds a new string to the runtime string table.

This method updates the localisation's runtime string table, which is useful for adding or changing the localisation during gameplay or in a built player. It doesn't modify the asset on disk, and any changes made will be lost when gameplay ends.

Name
Description

The collection of StringTableEntry objects to add.

IEnumerable<Yarn.Unity.StringTableEntry> stringTableEntries

if this Localization has a string for the given key;
false
otherwise.

string key

The key to search for.

Summary

Parameters

Returns

Localization
Localization
public virtual void Clear()

Summary

Localization

string value

The user-facing text for this string, in the language specified by LocaleCode .

string key

Summary

Remarks

Parameters

Localization

The key for this string (generally, the line ID.)

public bool ContainsLocalizedString(string key);
public void AddLocalizedString(string key, string value)

public sealed class LocalizationTableEntry

localizedAsset

Summary

Fields

Localization

Localization

Class in Yarn.Unity

Inherits from UnityEngine.ScriptableObject

Summary

public class Localization : ScriptableObject

Classes

Name
Description

Methods

Name
Description
Name
Description

AddLocalizedStrings(IEnumerable<KeyValuePair<string, string>>)

Method in

Adds a collection of strings to the runtime string table.

This method updates the localisation's runtime string table, which is useful for adding or changing the localisation during gameplay or in a built player. It doesn't modify the asset on disk, and any changes made will be lost when gameplay ends.

Name
Description
localizedAssetReference
localizedString

Adds a new string to the runtime string table.

Adds a collection of strings to the runtime string table.

Adds a collection of strings to the runtime string table.

Gets a value indicating whether this makes use of Addressable Assets ( true ), or if it stores its assets as direct references ( false ).

Properties

LocalizationTableEntry
public void AddLocalizedStrings(IEnumerable<KeyValuePair<string, string>> strings)

IEnumerable<KeyValuePair<string, string>> strings

Summary

Remarks

Parameters

Localization

localizedAssetReference

Field in

The collection of keys and strings to add.

public UnityEngine.AddressableAssets.AssetReference? localizedAssetReference;

Summary

LocalizationTableEntry

Returns a boolean value indicating whether this contains a string with the given key.

Gets the line IDs present in this localization.

AddLocalizedString(string,string)
AddLocalizedStrings(IEnumerable<KeyValuePair<string, string>>)
AddLocalizedStrings(IEnumerable)
UsesAddressableAssets
Localization

localizedString

Field in

GetLocalizedString(string)

Method in

Name
Description

UsesAddressableAssets

Property in

Gets a value indicating whether this makes use of Addressable Assets ( true ), or if it stores its assets as direct references ( false ).

If this property is true , Yarn.Unity.Localization.GetLocalizedObjectAsync1(System.String)</code> and <code>Yarn.Unity.Localization.ContainsLocalizedObject1(System.String) should not be used to retrieve localised objects. Instead, the Addressable Assets API should be used.

Clear()
ContainsLocalizedObject(string)
ContainsLocalizedString(string)
Localization
GetLineIDs()
GetLocalizedObjectAsync(string)
GetLocalizedString(string)
public string? localizedString;

Summary

LocalizationTableEntry
public string? GetLocalizedString(string key)

string key

Summary

Parameters

Localization
public bool UsesAddressableAssets { get; internal set; }

Summary

Remarks

Localization
Localization

GetLocalizedObjectAsync<T>(string)

Method in

Name
Description
public async YarnTask<T?> GetLocalizedObjectAsync<T>(string key)
    where T : UnityEngine.Object

string key

Summary

Parameters

Localization

ContainsLocalizedObject<T>(string)

Method in

Name
Description
public bool ContainsLocalizedObject<T>(string key)
    where T : UnityEngine.Object;

string key

Summary

Parameters

Localization