docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct TMP_LinkInfo

    Structure containing information about individual links contained in the text object.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: TMPro
    Assembly: Unity.TextMeshPro.dll
    Syntax
    public struct TMP_LinkInfo

    Fields

    hashCode

    Declaration
    public int hashCode
    Field Value
    Type Description
    int

    linkIdFirstCharacterIndex

    Declaration
    public int linkIdFirstCharacterIndex
    Field Value
    Type Description
    int

    linkIdLength

    Declaration
    public int linkIdLength
    Field Value
    Type Description
    int

    linkTextLength

    Declaration
    public int linkTextLength
    Field Value
    Type Description
    int

    linkTextfirstCharacterIndex

    Declaration
    public int linkTextfirstCharacterIndex
    Field Value
    Type Description
    int

    textComponent

    Declaration
    public TMP_Text textComponent
    Field Value
    Type Description
    TMP_Text

    Methods

    GetLink()

    Returns the link as a string.

    Declaration
    public string GetLink()
    Returns
    Type Description
    string

    The same identifier string as GetLinkID() for convenience when passing link metadata to UI handlers.

    Remarks

    Delegates to GetLinkID() so API consumers can treat the link token uniformly across scripting and inspector workflows.

    GetLinkID()

    Returns the link ID as a string.

    Declaration
    public string GetLinkID()
    Returns
    Type Description
    string

    Parsed id characters from the opening link tag, or an empty string when no text component is bound.

    Remarks

    Materializes the temporary linkID buffer into a managed string for comparisons against your application-specific link table.

    GetLinkText()

    Returns the text contained in a link.

    Declaration
    public string GetLinkText()
    Returns
    Type Description
    string

    Concatenated characters for the link body between linkTextfirstCharacterIndex and linkTextLength.

    Remarks

    Walks textInfo character entries so callers can display or hit-test the human-readable portion of a link tag.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)