docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Equals

    Equals<T>(ref T, ref T)

    Compares two component instances to one another

    Declaration
    public static bool Equals<T>(ref T left, ref T right) where T : struct
    Parameters
    Type Name Description
    T left

    Left-hand side of the comparison

    T right

    Right-hand side of the comparison

    Returns
    Type Description
    bool

    Returns true if the types are equal.

    Type Parameters
    Name Description
    T

    Type of the component instances

    Equals(void*, void*, TypeIndex)

    Compares two component instances to one another

    Declaration
    public static bool Equals(void* left, void* right, TypeIndex typeIndex)
    Parameters
    Type Name Description
    void* left

    Left-hand side of the comparison

    void* right

    Right-hand side of the comparison

    TypeIndex typeIndex

    TypeIndex for the two instances being compared

    Returns
    Type Description
    bool

    Returns true if the types are equal.

    Equals(object, object, TypeIndex)

    Compares two component instances to one another

    Declaration
    public static bool Equals(object left, object right, TypeIndex typeIndex)
    Parameters
    Type Name Description
    object left

    Left-hand side of the comparison

    object right

    Right-hand side of the comparison

    TypeIndex typeIndex

    TypeIndex for the two instances being compared

    Returns
    Type Description
    bool

    Returns true if the types are equal.

    Equals(object, void*, TypeIndex)

    Compares two component instances to one another

    Declaration
    public static bool Equals(object left, void* right, TypeIndex typeIndex)
    Parameters
    Type Name Description
    object left

    Left-hand side of the comparison

    void* right

    Right-hand side of the comparison

    TypeIndex typeIndex

    TypeIndex for the two instances being compared

    Returns
    Type Description
    bool

    Returns true if the types are equal.

    In This Article
    Back to top
    Copyright © 2024 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)