Class AssetTableCollection
Contains information on all the tables associated with a table collection name and type.
Implements
Inherited Members
Namespace: UnityEditor.Localization
Assembly: Unity.Localization.Editor.dll
Syntax
public class AssetTableCollection : LocalizationTableCollection, ISerializationCallbackReceiver
Properties
Name | Description |
---|---|
AssetTables | A helper property which is the contents of Tables loaded and cast to AssetTable. |
DefaultGroupName | The default value to use for Group. |
RequiredExtensionAttribute | The required attribute for an extension to be added to this collection through the Editor. |
TableType | The type of table stored in the collection. |
Methods
Name | Description |
---|---|
AddAssetToTable(LocaleIdentifier, TableEntryReference, Object, bool) | Add a localized asset to the asset table that matches the LocaleIdentifier. This function ensures the localization system adds the asset to the Addressables system and sets the asset up for use. |
AddAssetToTable(AssetTable, TableEntryReference, Object, bool) | Add a localized asset to the asset table. This function will ensure the localization system adds the asset to the Addressables system and sets the asset up for use. |
ClearAllEntries() | Removes all the entries from SharedTableData and all Tables that are part of this collection. |
GetEntryAssetType(TableEntryReference) | Returns the expected type for the entry. When an asset is first added to an entry, the type is recorded so that the Editor can ensure all subsequent assets that are added are compatible. |
GetRowEnumerator() | Returns an enumerator that can be used to step through each key and its localized values, such as in a foreach loop. Internally SharedTableData and AssetTable's are separate assets with their own internal list of values. This means that when iterating through each key a lookup must be made in each table in order to retrieve the localized value, this can become slow when dealing with a large number of tables and entries. GetRowEnumerator improves this process by first sorting the multiple internal lists and then stepping through each conceptual row at a time. It handles missing keys and table entries and provides a more efficient and faster way to iterate through the tables. |
RemoveAssetFromTable(AssetTable, TableEntryReference, bool) | Remove the asset mapping from the table entry and also cleans up the Addressables if necessary. |
RemoveEntry(TableEntryReference) | Removes the entry from the SharedTableData and all tables that are part of this collection. |
RemoveTableFromAddressables(LocalizationTable, bool) | Remove the table from the Addressables system. |
SetEntryAssetType(TableEntryReference, Type) | The type of asset that is expected by this entry. By default this is determined by the first asset that is added in the Editor however this can be used to override it so it always expects this asset type instead of reverting back to Object when the last asset is removed. |
UpdateAssetGroup(AddressableAssetSettings, AddressableAssetEntry, bool) | Updates the group the asset should belong to. Assets will be stored in groups for the Locale they are used by unless they are used by more than 1 Locale, then they will be moved to the shared group. |