Class AssetTableCollection | Localization | 0.9.0-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class AssetTableCollection

    Contains information on all the tables associated with a table collection name and type.

    Inheritance
    Object
    Object
    ScriptableObject
    LocalizationTableCollection
    AssetTableCollection
    Inherited Members
    LocalizationTableCollection.Tables
    LocalizationTableCollection.Extensions
    LocalizationTableCollection.TableCollectionName
    LocalizationTableCollection.TableCollectionNameReference
    LocalizationTableCollection.SharedData
    LocalizationTableCollection.Group
    LocalizationTableCollection.OnEnable()
    LocalizationTableCollection.SetTableCollectionName(String, Boolean)
    LocalizationTableCollection.SetPreloadTableFlag(Boolean, Boolean)
    LocalizationTableCollection.IsPreloadTableFlagSet()
    LocalizationTableCollection.AddTable(LocalizationTable, Boolean, Boolean)
    LocalizationTableCollection.AddNewTable(LocaleIdentifier)
    LocalizationTableCollection.AddNewTable(LocaleIdentifier, String)
    LocalizationTableCollection.RemoveTable(LocalizationTable, Boolean, Boolean)
    LocalizationTableCollection.GetTable(LocaleIdentifier)
    LocalizationTableCollection.RefreshAddressables(Boolean)
    LocalizationTableCollection.ContainsTable(LocalizationTable)
    LocalizationTableCollection.ContainsTable(LocaleIdentifier)
    LocalizationTableCollection.AddExtension(CollectionExtension)
    LocalizationTableCollection.RemoveExtension(CollectionExtension)
    LocalizationTableCollection.GetRowEnumerator<TTable, TEntry>(IEnumerable<TTable>)
    LocalizationTableCollection.CanAddTable(LocalizationTable)
    LocalizationTableCollection.AddSharedTableDataToAddressables()
    LocalizationTableCollection.AddTableToAddressables(LocalizationTable, Boolean)
    LocalizationTableCollection.ImportCollectionIntoProject()
    LocalizationTableCollection.RemoveCollectionFromProject()
    LocalizationTableCollection.OnBeforeSerialize()
    LocalizationTableCollection.OnAfterDeserialize()
    LocalizationTableCollection.ToString()
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(String)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.name
    Object.hideFlags
    Namespace: UnityEditor.Localization
    Syntax
    public class AssetTableCollection : LocalizationTableCollection, ISerializationCallbackReceiver

    Properties

    AssetTables

    A helper property which is the contents of loaded and cast to AssetTable.

    Declaration
    public virtual ReadOnlyCollection<AssetTable> AssetTables { get; }
    Property Value
    Type Description
    ReadOnlyCollection<AssetTable>

    DefaultAddressablesGroupName

    Declaration
    protected override string DefaultAddressablesGroupName { get; }
    Property Value
    Type Description
    String
    Overrides
    LocalizationTableCollection.DefaultAddressablesGroupName

    DefaultGroupName

    Declaration
    protected override string DefaultGroupName { get; }
    Property Value
    Type Description
    String
    Overrides
    LocalizationTableCollection.DefaultGroupName

    RequiredExtensionAttribute

    Declaration
    protected override Type RequiredExtensionAttribute { get; }
    Property Value
    Type Description
    Type
    Overrides
    LocalizationTableCollection.RequiredExtensionAttribute

    TableType

    Declaration
    protected override Type TableType { get; }
    Property Value
    Type Description
    Type
    Overrides
    LocalizationTableCollection.TableType

    Methods

    AddAssetToTable(AssetTable, TableEntryReference, Object, Boolean)

    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.

    Declaration
    public virtual void AddAssetToTable(AssetTable table, TableEntryReference entryReference, Object asset, bool createUndo = false)
    Parameters
    Type Name Description
    AssetTable table

    The table to add the asset to, must be part of the collection.

    TableEntryReference entryReference

    The table entry Key or Key Id.

    Object asset

    The asset to add.

    Boolean createUndo

    Should an undo operation be created?

    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.

    Declaration
    public IEnumerable<LocalizationTableCollection.Row<AssetTableEntry>> GetRowEnumerator()
    Returns
    Type Description
    IEnumerable<LocalizationTableCollection.Row<AssetTableEntry>>

    RemoveAssetFromTable(AssetTable, TableEntryReference, Boolean)

    Remove the asset mapping from the table entry and also cleans up the Addressables if necessary.

    Declaration
    public void RemoveAssetFromTable(AssetTable table, TableEntryReference entryReference, bool createUndo = false)
    Parameters
    Type Name Description
    AssetTable table
    TableEntryReference entryReference
    Boolean createUndo

    RemoveTableFromAddressables(LocalizationTable, Boolean)

    Declaration
    protected override void RemoveTableFromAddressables(LocalizationTable table, bool createUndo)
    Parameters
    Type Name Description
    LocalizationTable table
    Boolean createUndo
    Overrides
    LocalizationTableCollection.RemoveTableFromAddressables(LocalizationTable, Boolean)

    UpdateAssetGroup(AddressableAssetSettings, AddressableAssetEntry, Boolean)

    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.

    Declaration
    protected virtual void UpdateAssetGroup(AddressableAssetSettings settings, AddressableAssetEntry assetEntry, bool createUndo)
    Parameters
    Type Name Description
    AddressableAssetSettings settings
    AddressableAssetEntry assetEntry
    Boolean createUndo

    Used to indicate if an Undo operation should be created.

    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