docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method UncheckedVariantHashNBC

    UncheckedVariantHashNBC(string, string)

    Calculates the "variant hash" for the variant + component pair. Non-Burst Compatible version.

    Declaration
    [ExcludeFromBurstCompatTesting("Use managed types")]
    public static ulong UncheckedVariantHashNBC(string variantTypeFullName, string componentTypeFullName)
    Parameters
    Type Name Description
    string variantTypeFullName

    The Variant Type's System.Type.FullName.

    string componentTypeFullName

    The Component Type's System.Type.FullName that this variant applies to.

    Returns
    Type Description
    ulong

    The calculated hash.

    Remarks

    This method is not Burst Compatible.

    UncheckedVariantHashNBC(Type, ComponentType)

    Calculates a stable hash for a variant by combining the variant Type.Fullname and ComponentType name hash GetFullNameHash(TypeIndex).

    Declaration
    [ExcludeFromBurstCompatTesting("Use managed types")]
    public static ulong UncheckedVariantHashNBC(Type variantStructDeclaration, ComponentType componentType)
    Parameters
    Type Name Description
    Type variantStructDeclaration

    The Variant struct declaration type.

    ComponentType componentType

    The ComponentType that this variant applies to.

    Returns
    Type Description
    ulong

    The calculated hash.

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