Class LocalizedAssetDatabase
The Localized Asset Database provides a single point of access for all localized assets.
Inherited Members
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
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
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 virtual 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)
Called before the LocaleChanged event is sent out in order to give the database a chance to prepare.
Declaration
public override void OnLocaleChanged(Locale locale)
Parameters
Type | Name | Description |
---|---|---|
Locale | locale |