Class LocalizedAssetDatabase | Localization | 0.6.1-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class LocalizedAssetDatabase

    The Localized Asset Database provides a single point of access for all localized assets.

    Inheritance
    Object
    LocalizedDatabase<AssetTable, AssetTableEntry>
    LocalizedAssetDatabase
    Inherited Members
    LocalizedDatabase<AssetTable, AssetTableEntry>.PreloadOperation
    LocalizedDatabase<AssetTable, AssetTableEntry>.ResourceManager
    LocalizedDatabase<AssetTable, AssetTableEntry>.DefaultTable
    LocalizedDatabase<AssetTable, AssetTableEntry>.GetTableAsync(TableReference, Locale)
    LocalizedDatabase<AssetTable, AssetTableEntry>.GetTableAsync(TableReference)
    LocalizedDatabase<AssetTable, AssetTableEntry>.GetTableEntryAsync(TableReference, TableEntryReference, Locale)
    LocalizedDatabase<AssetTable, AssetTableEntry>.GetTableEntryAsync(TableReference, TableEntryReference)
    LocalizedDatabase<AssetTable, AssetTableEntry>.OnLocaleChanged(Locale)
    Namespace: UnityEngine.Localization.Settings
    Syntax
    [Serializable]
    public class LocalizedAssetDatabase : LocalizedDatabase<AssetTable, AssetTableEntry>, IPreloadRequired
    Remarks

    A localized asset must derive from .

    Methods

    GetLocalizedAssetAsync<TObject>(TableEntryReference)

    Returns a handle to a localized asset loading operation from the . 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<TObject> GetLocalizedAssetAsync<TObject>(TableEntryReference tableEntryReference)
    Parameters
    Type Name Description
    TableEntryReference tableEntryReference

    A reference to the entry in the

    Returns
    Type Description
    AsyncOperationHandle<TObject>
    Type Parameters
    Name Description
    TObject

    The type of asset that should be loaded.

    GetLocalizedAssetAsync<TObject>(TableEntryReference, Locale)

    Returns a handle to a localized asset loading operation from the . 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<TObject> GetLocalizedAssetAsync<TObject>(TableEntryReference tableEntryReference, Locale locale)
    Parameters
    Type Name Description
    TableEntryReference tableEntryReference

    A reference to the entry in the

    Locale locale
    Returns
    Type Description
    AsyncOperationHandle<TObject>
    Type Parameters
    Name Description
    TObject

    The type of asset that should be loaded.

    GetLocalizedAssetAsync<TObject>(TableReference, TableEntryReference)

    Returns a handle to a localized asset loading operation from the requested 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<TObject> GetLocalizedAssetAsync<TObject>(TableReference tableReference, TableEntryReference tableEntryReference)
    Parameters
    Type Name Description
    TableReference tableReference

    A reference to the table that the asset should be loaded from.

    TableEntryReference tableEntryReference

    A reference to the entry in the table.

    Returns
    Type Description
    AsyncOperationHandle<TObject>
    Type Parameters
    Name Description
    TObject

    The type of asset that should be loaded.

    GetLocalizedAssetAsync<TObject>(TableReference, TableEntryReference, Locale)

    Returns a handle to a localized asset loading operation from the requested 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<TObject> GetLocalizedAssetAsync<TObject>(TableReference tableReference, TableEntryReference tableEntryReference, Locale locale)
    Parameters
    Type Name Description
    TableReference tableReference

    A reference to the table that the asset should be loaded from.

    TableEntryReference tableEntryReference

    A reference to the entry in the table.

    Locale locale

    The Locale to use instead of the default SelectedLocale

    Returns
    Type Description
    AsyncOperationHandle<TObject>
    Type Parameters
    Name Description
    TObject

    The type of asset that should be loaded.

    GetLocalizedAssetAsyncInternal<TObject>(TableReference, TableEntryReference, Locale)

    Implementation for all versions of GetLocalizedAssetAsync<TObject>(TableEntryReference).

    Declaration
    protected virtual AsyncOperationHandle<TObject> GetLocalizedAssetAsyncInternal<TObject>(TableReference tableReference, TableEntryReference tableEntryReference, Locale locale)
    Parameters
    Type Name Description
    TableReference tableReference

    A reference to the table that the asset should be loaded from.

    TableEntryReference tableEntryReference

    A reference to the entry in the table.

    Locale locale

    The Locale to use instead of the default SelectedLocale

    Returns
    Type Description
    AsyncOperationHandle<TObject>
    Type Parameters
    Name Description
    TObject

    The type of asset that should be loaded.

    GetLocalizedAssetLoadAsset<TObject>(AsyncOperationHandle<LocalizedDatabase<AssetTable, AssetTableEntry>.TableEntryResult>, TableEntryReference)

    /// Performs the final step after the AssetTableEntry has been found. Starts the table asset loading operation.

    Declaration
    protected virtual AsyncOperationHandle<TObject> GetLocalizedAssetLoadAsset<TObject>(AsyncOperationHandle<LocalizedDatabase<AssetTable, AssetTableEntry>.TableEntryResult> entryOp, TableEntryReference tableEntryReference)
    Parameters
    Type Name Description
    AsyncOperationHandle<LocalizedDatabase.TableEntryResult<>> entryOp

    The table entry operation returned from

    TableEntryReference tableEntryReference

    A reference to the entry in the table.

    Returns
    Type Description
    AsyncOperationHandle<TObject>
    Type Parameters
    Name Description
    TObject

    The type of asset that should be loaded.

    OnLocaleChanged(Locale)

    Declaration
    public override void OnLocaleChanged(Locale locale)
    Parameters
    Type Name Description
    Locale locale
    Overrides
    UnityEngine.Localization.Settings.LocalizedDatabase<UnityEngine.Localization.Tables.AssetTable, UnityEngine.Localization.Tables.AssetTableEntry>.OnLocaleChanged(UnityEngine.Localization.Locale)
    In This Article
    • Methods
      • GetLocalizedAssetAsync<TObject>(TableEntryReference)
      • GetLocalizedAssetAsync<TObject>(TableEntryReference, Locale)
      • GetLocalizedAssetAsync<TObject>(TableReference, TableEntryReference)
      • GetLocalizedAssetAsync<TObject>(TableReference, TableEntryReference, Locale)
      • GetLocalizedAssetAsyncInternal<TObject>(TableReference, TableEntryReference, Locale)
      • GetLocalizedAssetLoadAsset<TObject>(AsyncOperationHandle<LocalizedDatabase<AssetTable, AssetTableEntry>.TableEntryResult>, TableEntryReference)
      • OnLocaleChanged(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