docs.unity.cn
    Show / Hide Table of Contents

    Class Tag

    Tag instance are used as filter arguments when querying CatalogItem instances within a catalog.

    Inheritance
    Object
    Tag
    Namespace: UnityEngine.GameFoundation
    Syntax
    public sealed class Tag : IEquatable<Tag>, IComparable<Tag>

    Properties

    key

    The identifier of this Tag.

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

    Methods

    Equals(Object)

    Tells whether this Tag instance equals obj.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The other object to compare this instance with.

    Returns
    Type Description
    Boolean

    true if equals, false otherwise.

    Overrides
    Object.Equals(Object)

    GetHashCode()

    Gets the hash code of this Tag instance. Returns the hash code of its key.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    The hash code of this Tag instance.

    Overrides
    Object.GetHashCode()

    Operators

    Equality(Tag, Tag)

    == Overload. If key matches then the Tag instances are deemed equal.

    Declaration
    public static bool operator ==(Tag a, Tag b)
    Parameters
    Type Name Description
    Tag a

    A Tag instance to compare.

    Tag b

    The Tag instance to compare to.

    Returns
    Type Description
    Boolean

    true if both Tag are the same.

    Remarks

    Two null objects are considered equal.

    Inequality(Tag, Tag)

    != Overload. If key doesn't match then the Tag instances are deemed not equal.

    Declaration
    public static bool operator !=(Tag x, Tag y)
    Parameters
    Type Name Description
    Tag x

    A Tag instance to compare.

    Tag y

    The Tag instance to compare to.

    Returns
    Type Description
    Boolean

    true if both Tag are not the same.

    Remarks

    Two null objects are considered equal.

    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 16 June 2021