docs.unity3d.com
    Show / Hide Table of Contents

    Struct TableEntryReference

    Allows for referencing a table entry via key or key id.

    Namespace: UnityEngine.Localization.Tables
    Syntax
    [Serializable]
    public struct TableEntryReference : ISerializationCallbackReceiver, IEquatable<TableEntryReference>

    Properties

    Key

    The key name when ReferenceType is Name.

    Declaration
    public string Key { get; }
    Property Value
    Type Description
    String

    KeyId

    The Key Id when ReferenceType is Id.

    Declaration
    public long KeyId { get; }
    Property Value
    Type Description
    Int64

    ReferenceType

    The type of reference.

    Declaration
    public TableEntryReference.Type ReferenceType { get; }
    Property Value
    Type Description
    TableEntryReference.Type

    Methods

    Equals(Object)

    Compare the TableEntryReference to another TableEntryReference.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    Overrides
    ValueType.Equals(Object)

    Equals(TableEntryReference)

    Compare the TableEntryReference to another TableEntryReference.

    Declaration
    public bool Equals(TableEntryReference other)
    Parameters
    Type Name Description
    TableEntryReference other
    Returns
    Type Description
    Boolean

    GetHashCode()

    Returns the hash code of Key or KeyId.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    ValueType.GetHashCode()

    ResolveKeyName(SharedTableData)

    Returns the key name. If ReferenceType is Name then Key will be returned. If ReferenceType is Id then sharedData will be used to extract the name.

    Declaration
    public string ResolveKeyName(SharedTableData sharedData)
    Parameters
    Type Name Description
    SharedTableData sharedData

    The SharedTableData to use if the key name is not stored in the reference or null if it could not br resolbved.

    Returns
    Type Description
    String

    ToString(TableReference)

    Returns a string representation.

    Declaration
    public string ToString(TableReference tableReference)
    Parameters
    Type Name Description
    TableReference tableReference

    The TableReference that this entry is part of. This is used to extract the Key or KeyId

    Returns
    Type Description
    String

    Operators

    Implicit(Int64 to TableEntryReference)

    Converts a key id into a reference.

    Declaration
    public static implicit operator TableEntryReference(long keyId)
    Parameters
    Type Name Description
    Int64 keyId
    Returns
    Type Description
    TableEntryReference

    Implicit(String to TableEntryReference)

    Converts a string name into a reference.

    Declaration
    public static implicit operator TableEntryReference(string key)
    Parameters
    Type Name Description
    String key
    Returns
    Type Description
    TableEntryReference

    Implicit(TableEntryReference to Int64)

    Returns KeyId

    Declaration
    public static implicit operator long (TableEntryReference tableEntryReference)
    Parameters
    Type Name Description
    TableEntryReference tableEntryReference
    Returns
    Type Description
    Int64

    Implicit(TableEntryReference to String)

    Returns Key.

    Declaration
    public static implicit operator string (TableEntryReference tableEntryReference)
    Parameters
    Type Name Description
    TableEntryReference tableEntryReference
    Returns
    Type Description
    String
    In This Article
    • Properties
      • Key
      • KeyId
      • ReferenceType
    • Methods
      • Equals(Object)
      • Equals(TableEntryReference)
      • GetHashCode()
      • ResolveKeyName(SharedTableData)
      • ToString(TableReference)
    • Operators
      • Implicit(Int64 to TableEntryReference)
      • Implicit(String to TableEntryReference)
      • Implicit(TableEntryReference to Int64)
      • Implicit(TableEntryReference to String)
    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