docs.unity.cn
    Show / Hide Table of Contents

    Method IsDescendantOf

    IsDescendantOf(TypeIndex, TypeIndex)

    Used to determine if a component inherits from another component type

    Declaration
    [GenerateTestsForBurstCompatibility]
    public static bool IsDescendantOf(TypeIndex typeIndex, TypeIndex baseTypeIndex)
    Parameters
    Type Name Description
    TypeIndex typeIndex

    Child type to test if it inherits from baseTypeIndex

    TypeIndex baseTypeIndex

    Parent type typeIndex may have inherited from

    Returns
    Type Description
    Boolean

    Returns if child is a subclass of the parent component type

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023