Class AssetTable
An AssetTable
Inheritance
Inherited Members
Namespace: UnityEngine.Localization.Tables
Syntax
public class AssetTable : DetailedLocalizationTable<AssetTableEntry>, IMetadataCollection, IComparable<LocalizationTable>, IDictionary<long, AssetTableEntry>, ICollection<KeyValuePair<long, AssetTableEntry>>, IEnumerable<KeyValuePair<long, AssetTableEntry>>, IEnumerable, ISerializationCallbackReceiver, IPreloadRequired
Properties
PreloadOperation
Handle to the preload operation for this table. Calling this will start the asset tables preloading operation, it will preload all assets referenced unless the Metadata PreloadAssetTableMetadata is found and has the NoPreload behavior.
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>(TableEntryReference)
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>(TableEntryReference entryReference)
where TObject : Object
Parameters
Type | Name | Description |
---|---|---|
TableEntryReference | entryReference |
Returns
Type | Description |
---|---|
AsyncOperationHandle<TObject> |
Type Parameters
Name | Description |
---|---|
TObject | The type of object to load. |
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()