Class LocalizedTable<TTable, TEntry> | Localization | 0.9.0-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class LocalizedTable<TTable, TEntry>

    A Localized Table allows for referencing a LocalizationTable at runtime.

    Inheritance
    Object
    LocalizedTable<TTable, TEntry>
    LocalizedAssetTable
    LocalizedStringTable
    Namespace: UnityEngine.Localization
    Syntax
    [Serializable]
    public abstract class LocalizedTable<TTable, TEntry>
        where TTable : DetailedLocalizationTable<TEntry> where TEntry : TableEntry
    Type Parameters
    Name Description
    TTable
    TEntry

    Properties

    CurrentLoadingOperation

    The current loading operation for the table. A table may not be immediately available, so all operations are wrapped with an AsyncOperationHandle.

    Declaration
    public AsyncOperationHandle<TTable> CurrentLoadingOperation { get; }
    Property Value
    Type Description
    AsyncOperationHandle<TTable>

    Database

    Declaration
    protected abstract LocalizedDatabase<TTable, TEntry> Database { get; }
    Property Value
    Type Description
    LocalizedDatabase<TTable, TEntry>

    IsEmpty

    Does TableReference contain a valid reference?

    Declaration
    public bool IsEmpty { get; }
    Property Value
    Type Description
    Boolean

    TableReference

    A reference to the LocalizationTable. A table reference can be either the name of the table or the table collection name Guid.

    Declaration
    public TableReference TableReference { get; set; }
    Property Value
    Type Description
    TableReference

    Methods

    ForceUpdate()

    Called when a value has been changed and an update may be required.

    Declaration
    protected void ForceUpdate()

    GetTable()

    Declaration
    public AsyncOperationHandle<TTable> GetTable()
    Returns
    Type Description
    AsyncOperationHandle<TTable>

    ToString()

    Returns a string representation including the TableReference.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()

    Events

    TableChanged

    Called whenever a table is available. When the first LocalizedTable<TTable, TEntry>.ChangeHandler is added, a loading operation will automatically start and the table will be sent to the event when completed. Any adding additional subscribers added after loading has completed will also be sent the latest table when they are added. This ensures that a subscriber will always have the correct table regardless of when it was added. The table will be refreshed whenever SelectedLocaleChanged is changed. GetTable() when not using the event.

    Declaration
    public event LocalizedTable<TTable, TEntry>.ChangeHandler TableChanged
    Event Type
    Type Description
    LocalizedTable.ChangeHandler<>
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023