docs.unity3d.com
    Show / Hide Table of Contents

    Class DetailedLocalizationTable<TEntry>

    Provides common functionality for both string and asset tables.

    Inheritance
    Object
    Object
    ScriptableObject
    LocalizationTable
    DetailedLocalizationTable<TEntry>
    AssetTable
    StringTable
    Inherited Members
    LocalizationTable.LocaleIdentifier
    LocalizationTable.TableCollectionName
    LocalizationTable.SharedData
    LocalizationTable.MetadataEntries
    LocalizationTable.GetMetadata<TObject>()
    LocalizationTable.GetMetadatas<TObject>(IList<TObject>)
    LocalizationTable.GetMetadatas<TObject>()
    LocalizationTable.AddMetadata(IMetadata)
    LocalizationTable.RemoveMetadata(IMetadata)
    LocalizationTable.Contains(IMetadata)
    LocalizationTable.FindKeyId(String, Boolean)
    LocalizationTable.CompareTo(LocalizationTable)
    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: UnityEngine.Localization.Tables
    Syntax
    public abstract class DetailedLocalizationTable<TEntry> : LocalizationTable, IMetadataCollection, IComparable<LocalizationTable>, IDictionary<long, TEntry>, ICollection<KeyValuePair<long, TEntry>>, IEnumerable<KeyValuePair<long, TEntry>>, IEnumerable, ISerializationCallbackReceiver where TEntry : TableEntry
    Type Parameters
    Name Description
    TEntry

    Properties

    Count

    The number of entries in this Table.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    Int32

    IsReadOnly

    Will always be false. Implemented because it is required by the System.Collections.IList interface.

    Declaration
    public bool IsReadOnly { get; }
    Property Value
    Type Description
    Boolean

    Item[Int64]

    Get/Set a value using the specified key.

    Declaration
    public TEntry this[long key] { get; set; }
    Parameters
    Type Name Description
    Int64 key
    Property Value
    Type Description
    TEntry

    Item[String]

    Get/Set a value using the specified key name.

    Declaration
    public TEntry this[string keyName] { get; set; }
    Parameters
    Type Name Description
    String keyName
    Property Value
    Type Description
    TEntry

    Values

    All values in this table.

    Declaration
    public ICollection<TEntry> Values { get; }
    Property Value
    Type Description
    ICollection<TEntry>

    Methods

    Add(KeyValuePair<Int64, TEntry>)

    Adds the item value with the specified keyId.

    Declaration
    public void Add(KeyValuePair<long, TEntry> item)
    Parameters
    Type Name Description
    KeyValuePair<Int64, TEntry> item

    Add(Int64, TEntry)

    Adds the entry with the specified keyId.

    Declaration
    public void Add(long keyId, TEntry value)
    Parameters
    Type Name Description
    Int64 keyId
    TEntry value

    AddEntry(Int64, String)

    Add or update an entry in the table.

    Declaration
    public virtual TEntry AddEntry(long keyId, string localized)
    Parameters
    Type Name Description
    Int64 keyId

    The unique key id.

    String localized

    The localized item, a string for StringTable or asset guid for AssetTable.

    Returns
    Type Description
    TEntry

    AddEntry(String, String)

    Add or update an entry in the table.

    Declaration
    public TEntry AddEntry(string key, string localized)
    Parameters
    Type Name Description
    String key

    The name of the key.

    String localized

    The localized item, a string for StringTable or asset guid for AssetTable.

    Returns
    Type Description
    TEntry

    AddEntryFromReference(TableEntryReference, String)

    Add or update an entry in the table.

    Declaration
    public TEntry AddEntryFromReference(TableEntryReference entryReference, string localized)
    Parameters
    Type Name Description
    TableEntryReference entryReference

    The TableEntryReference containing a valid Key or Key Id.

    String localized

    The localized item, a string for StringTable or asset guid for AssetTable

    Returns
    Type Description
    TEntry

    CheckForMissingSharedTableDataEntries(MissingEntryAction)

    Tables do not store the full information for an entry, instead they store just the Id of that entry which can then be referenced in SharedData. It is possible that something may have caused an entry to be in the Table but missing from SharedData. This will cause issues and often result in the entry being ignored. This will check for any entries that exist in the table but do not have an entry in SharedData.

    Declaration
    public IList<TEntry> CheckForMissingSharedTableDataEntries(MissingEntryAction action = MissingEntryAction.Nothing)
    Parameters
    Type Name Description
    MissingEntryAction action

    The action to take on the found missing entries.

    Returns
    Type Description
    IList<TEntry>

    The identified missing entries.

    Clear()

    Clear all entries in this table.

    Declaration
    public void Clear()

    Contains(KeyValuePair<Int64, TEntry>)

    Returns true if the table contains the item.

    Declaration
    public bool Contains(KeyValuePair<long, TEntry> item)
    Parameters
    Type Name Description
    KeyValuePair<Int64, TEntry> item
    Returns
    Type Description
    Boolean

    ContainsKey(Int64)

    Returns true if the table contains an entry with the keyId.

    Declaration
    public bool ContainsKey(long keyId)
    Parameters
    Type Name Description
    Int64 keyId
    Returns
    Type Description
    Boolean

    ContainsValue(String)

    Returns true if the table contains an entry with the same value.

    Declaration
    public bool ContainsValue(string localized)
    Parameters
    Type Name Description
    String localized

    The value to check for in all table entries.

    Returns
    Type Description
    Boolean

    True if a match was found else false.

    CopyTo(KeyValuePair<Int64, TEntry>[], Int32)

    Copies the contents of the table into an array starting at the arrayIndex.

    Declaration
    public void CopyTo(KeyValuePair<long, TEntry>[] array, int arrayIndex)
    Parameters
    Type Name Description
    KeyValuePair<Int64, TEntry>[] array
    Int32 arrayIndex

    CreateEmpty(TableEntryReference)

    Create an empty entry in the table at the specified entry.

    Declaration
    public override void CreateEmpty(TableEntryReference entryReference)
    Parameters
    Type Name Description
    TableEntryReference entryReference
    Overrides
    LocalizationTable.CreateEmpty(TableEntryReference)

    CreateTableEntry()

    Returns a new instance of TEntry.

    Declaration
    public abstract TEntry CreateTableEntry()
    Returns
    Type Description
    TEntry

    GetEntry(Int64)

    Returns the entry for the key id or null if one does not exist.

    Declaration
    public virtual TEntry GetEntry(long keyId)
    Parameters
    Type Name Description
    Int64 keyId
    Returns
    Type Description
    TEntry

    GetEntry(String)

    Returns the entry for the key or null if one does not exist.

    Declaration
    public TEntry GetEntry(string key)
    Parameters
    Type Name Description
    String key
    Returns
    Type Description
    TEntry

    GetEntryFromReference(TableEntryReference)

    Returns the entry reference or null if one does not exist.

    Declaration
    public TEntry GetEntryFromReference(TableEntryReference entryReference)
    Parameters
    Type Name Description
    TableEntryReference entryReference
    Returns
    Type Description
    TEntry

    GetEnumerator()

    Return an enumerator for the entries in this table.

    Declaration
    public IEnumerator<KeyValuePair<long, TEntry>> GetEnumerator()
    Returns
    Type Description
    IEnumerator<KeyValuePair<Int64, TEntry>>

    Remove(KeyValuePair<Int64, TEntry>)

    Remove the item from the table if it exists.

    Declaration
    public bool Remove(KeyValuePair<long, TEntry> item)
    Parameters
    Type Name Description
    KeyValuePair<Int64, TEntry> item
    Returns
    Type Description
    Boolean

    Remove(Int64)

    Remove the entry with the keyId.

    Declaration
    public bool Remove(long keyId)
    Parameters
    Type Name Description
    Int64 keyId
    Returns
    Type Description
    Boolean

    RemoveEntry(Int64)

    Remove an entry from the table if it exists.

    Declaration
    public virtual bool RemoveEntry(long keyId)
    Parameters
    Type Name Description
    Int64 keyId

    The key id to remove.

    Returns
    Type Description
    Boolean

    True if the entry was found and removed.

    RemoveEntry(String)

    Remove an entry from the table if it exists.

    Declaration
    public bool RemoveEntry(string key)
    Parameters
    Type Name Description
    String key

    The name of the key.

    Returns
    Type Description
    Boolean

    True if the entry was found and removed.

    TryGetValue(Int64, out TEntry)

    Find the entry, if it exists in the table.

    Declaration
    public bool TryGetValue(long keyId, out TEntry value)
    Parameters
    Type Name Description
    Int64 keyId
    TEntry value
    Returns
    Type Description
    Boolean

    True if the entry was found.


    Did you find this page useful? Please give it a rating:

    Thanks for rating this page!

    Report a problem on this page

    What kind of problem would you like to report?

    • This page needs code samples
    • Code samples do not work
    • Information is missing
    • Information is incorrect
    • Information is unclear or confusing
    • There is a spelling/grammar error on this page
    • Something else

    Thanks for letting us know! This page has been marked for review based on your feedback.

    If you have time, you can provide more information to help us fix the problem faster.

    Provide more information

    You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:

    You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:

    You've told us there is information missing from this page. Please tell us more about what's missing:

    You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:

    You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:

    You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:

    You've told us this page has a problem. Please tell us more about what's wrong:

    Thank you for helping to make the Unity documentation better!

    Your feedback has been submitted as a ticket for our documentation team to review.

    We are not able to reply to every ticket submitted.

    In This Article
    • Properties
      • Count
      • IsReadOnly
      • Item[Int64]
      • Item[String]
      • Values
    • Methods
      • Add(KeyValuePair<Int64, TEntry>)
      • Add(Int64, TEntry)
      • AddEntry(Int64, String)
      • AddEntry(String, String)
      • AddEntryFromReference(TableEntryReference, String)
      • CheckForMissingSharedTableDataEntries(MissingEntryAction)
      • Clear()
      • Contains(KeyValuePair<Int64, TEntry>)
      • ContainsKey(Int64)
      • ContainsValue(String)
      • CopyTo(KeyValuePair<Int64, TEntry>[], Int32)
      • CreateEmpty(TableEntryReference)
      • CreateTableEntry()
      • GetEntry(Int64)
      • GetEntry(String)
      • GetEntryFromReference(TableEntryReference)
      • GetEnumerator()
      • Remove(KeyValuePair<Int64, TEntry>)
      • Remove(Int64)
      • RemoveEntry(Int64)
      • RemoveEntry(String)
      • TryGetValue(Int64, out TEntry)
    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