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

    Class LocalizedDatabase<TTable, TEntry>

    Inheritance
    Object
    LocalizedDatabase<TTable, TEntry>
    LocalizedAssetDatabase
    LocalizedStringDatabase
    Namespace: UnityEngine.Localization.Settings
    Syntax
    [Serializable]
    public abstract class LocalizedDatabase<TTable, TEntry> : IPreloadRequired where TTable : DetailedLocalizationTable<TEntry> where TEntry : TableEntry
    Type Parameters
    Name Description
    TTable
    TEntry

    Properties

    DefaultTable

    The default table to use when no table collection name is provided.

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

    PreloadOperation

    Preload operation. Loads all tables and their contents(when applicable) marked with the preload label for the selected locale.

    Declaration
    public AsyncOperationHandle PreloadOperation { get; }
    Property Value
    Type Description
    AsyncOperationHandle
    Implements
    IPreloadRequired.PreloadOperation

    ResourceManager

    The ResourceManager to use when generating loading operations. By default uses UnityEngine.Localization.Settings.LocalizationSettings.ResourceManager

    Declaration
    protected virtual ResourceManager ResourceManager { get; }
    Property Value
    Type Description
    ResourceManager

    Methods

    GetTableAsync(TableReference)

    Returns the named table. This function is asynchronous and may not have an immediate result available. Check IsDone to see if the data is available, if it is false then use the Completed event or yield on the operation.

    Declaration
    public AsyncOperationHandle<TTable> GetTableAsync(TableReference tableReference)
    Parameters
    Type Name Description
    TableReference tableReference

    The table identifier. Can be either the name of the table or the table collection name Guid.

    Returns
    Type Description
    AsyncOperationHandle<TTable>

    GetTableAsync(TableReference, Locale)

    Returns the named table. This function is asynchronous and may not have an immediate result available. Check IsDone to see if the data is available, if it is false then use the Completed event or yield on the operation.

    Declaration
    public virtual AsyncOperationHandle<TTable> GetTableAsync(TableReference tableReference, Locale locale)
    Parameters
    Type Name Description
    TableReference tableReference

    The table identifier. Can be either the name of the table or the table collection name Guid.

    Locale locale

    The Locale to load the table from if you do not wish to use SelectedLocale.

    Returns
    Type Description
    AsyncOperationHandle<TTable>

    GetTableEntryAsync(TableReference, TableEntryReference)

    Returns the entry from the requested table. A table entry will contain the localized item and metadata. This function is asynchronous and may not have an immediate result available. Check IsDone to see if the data is available, if it is false then use the Completed event or yield on the operation.

    Declaration
    public virtual AsyncOperationHandle<LocalizedDatabase<TTable, TEntry>.TableEntryResult> GetTableEntryAsync(TableReference tableReference, TableEntryReference tableEntryReference)
    Parameters
    Type Name Description
    TableReference tableReference

    The table identifier. Can be either the name of the table or the table collection name Guid.

    TableEntryReference tableEntryReference

    A reference to the entry in the table.

    Returns
    Type Description
    AsyncOperationHandle<LocalizedDatabase.TableEntryResult<>>

    GetTableEntryAsync(TableReference, TableEntryReference, Locale)

    Returns the entry from the requested table. A table entry will contain the localized item and metadata. This function is asynchronous and may not have an immediate result available. Check IsDone to see if the data is available, if it is false then use the Completed event or yield on the operation.

    Declaration
    public AsyncOperationHandle<LocalizedDatabase<TTable, TEntry>.TableEntryResult> GetTableEntryAsync(TableReference tableReference, TableEntryReference tableEntryReference, Locale locale)
    Parameters
    Type Name Description
    TableReference tableReference

    The table identifier. Can be either the name of the table or the table collection name Guid.

    TableEntryReference tableEntryReference

    A reference to the entry in the table.

    Locale locale

    The Locale to load the table from if you do not wish to use SelectedLocale.

    Returns
    Type Description
    AsyncOperationHandle<LocalizedDatabase.TableEntryResult<>>

    OnLocaleChanged(Locale)

    Called before the LocaleChanged event is sent out in order to give the database a chance to prepare.

    Declaration
    public virtual void OnLocaleChanged(Locale locale)
    Parameters
    Type Name Description
    Locale locale
    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