docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetHashCode

    GetHashCode<T>(ref T)

    Generates a hash for a given component instance

    Declaration
    public static int GetHashCode<T>(ref T val) where T : struct
    Parameters
    Type Name Description
    T val

    Component instance to hash

    Returns
    Type Description
    int

    Returns true if the types are equal.

    Type Parameters
    Name Description
    T

    Component type

    GetHashCode(void*, TypeIndex)

    Generates a hash for a given component instance

    Declaration
    public static int GetHashCode(void* val, TypeIndex typeIndex)
    Parameters
    Type Name Description
    void* val

    Pointer to component instance to hash

    TypeIndex typeIndex

    TypeIndex for the component

    Returns
    Type Description
    int

    Returns true if the types are equal.

    GetHashCode(object, TypeIndex)

    Generates a hash for a given component instance

    Declaration
    public static int GetHashCode(object val, TypeIndex typeIndex)
    Parameters
    Type Name Description
    object val

    Component instance to hash

    TypeIndex typeIndex

    TypeIndex for the component

    Returns
    Type Description
    int

    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)