Class AssetTable
An AssetTable
Inherited Members
Namespace: UnityEngine.Localization.Tables
Syntax
public class AssetTable : DetailedLocalizationTable<AssetTableEntry>, IMetadataCollection, IComparable<LocalizationTable>, IDictionary<long, AssetTableEntry>, ISerializationCallbackReceiver, IPreloadRequired
Properties
PreloadOperation
Declaration
public virtual AsyncOperationHandle PreloadOperation { get; }
Property Value
Type | Description |
---|---|
AsyncOperationHandle |
Implements
Methods
CreateTableEntry()
Creates a new, empty AssetTableEntry.
Declaration
public override AssetTableEntry CreateTableEntry()
Returns
Type | Description |
---|---|
AssetTableEntry |
Overrides
GetAssetAsync<TObject>(Int64)
Returns the loading operation for the asset. Check isDone to see if the asset is available for immediate use, if not you can yield on the operation or add a callback subscriber.
Declaration
public AsyncOperationHandle<TObject> GetAssetAsync<TObject>(long keyId)
where TObject : Object
Parameters
Type | Name | Description |
---|---|---|
Int64 | keyId |
Returns
Type | Description |
---|---|
AsyncOperationHandle<TObject> |
Type Parameters
Name | Description |
---|---|
TObject |
ReleaseAsset(AssetTableEntry)
Release an asset for a single entry that have been preloaded or cached
Declaration
public void ReleaseAsset(AssetTableEntry entry)
Parameters
Type | Name | Description |
---|---|---|
AssetTableEntry | entry | A reference to the entry in the table. |
ReleaseAsset(TableEntryReference)
Release an asset for a single entry that have been preloaded or cached
Declaration
public void ReleaseAsset(TableEntryReference entry)
Parameters
Type | Name | Description |
---|---|---|
TableEntryReference | entry | A reference to the entry in the table. |
ReleaseAssets()
Releases all assets that have been preloaded or cached resets the preload state so it can be performed again. Note: This is called automatically by LocalizedAssetDatabase when the SelectedLocale is changed.
Declaration
public void ReleaseAssets()