docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method CalculateVariantHashForComponent

    CalculateVariantHashForComponent(ComponentType)

    Calculates the "variant hash" for the component type itself, so that we can fetch the meta-data.

    Declaration
    public static ulong CalculateVariantHashForComponent(ComponentType componentType)
    Parameters
    Type Name Description
    ComponentType componentType

    The ComponentType to be used for both the component, and the variant.

    Returns
    Type Description
    ulong

    The calculated hash.

    Remarks

    It's a little odd, but the default serializer for a Component is the ComponentType itself. I.e. It is its own variant.

    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)