docs.unity.cn
    Show / Hide Table of Contents

    Method GetTag

    GetTag()

    Gets the tag of the GameObject.

    Declaration
    public string GetTag()
    Returns
    Type Description
    String

    Returns the tag of the GameObject.

    Remarks

    This takes a dependency on the tag.

    GetTag(Component)

    Gets the tag of the GameObject for a given component.

    Declaration
    public string GetTag(Component component)
    Parameters
    Type Name Description
    Component component

    The Object to get the tag from.

    Returns
    Type Description
    String

    Returns the tag of the GameObject.

    Remarks

    This takes a dependency on the tag

    GetTag(GameObject)

    Gets the tag of the GameObject for a given GameObject.

    Declaration
    public string GetTag(GameObject gameObject)
    Parameters
    Type Name Description
    GameObject gameObject

    The GameObject to get the tag from.

    Returns
    Type Description
    String

    Returns the tag of the GameObject.

    Remarks

    This takes a dependency on the tag

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023