docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetAssignableComponentTypes

    GetAssignableComponentTypes(Type, List<Type>)

    Gets a list of the types of components that can be assigned to the specified component.

    Declaration
    [ExcludeFromBurstCompatTesting("Takes managed Type")]
    public List<Type> GetAssignableComponentTypes(Type interfaceType, List<Type> listOut)
    Parameters
    Type Name Description
    Type interfaceType

    The type to check.

    List<Type> listOut

    The list to receive the output.

    Returns
    Type Description
    List<Type>

    The list that was passed in, containing the System.Types that can be assigned to interfaceType.

    Remarks

    Assignable components include those with the same compile-time type and those that inherit from the same compile-time type.

    GetAssignableComponentTypes(Type)

    Gets a list of the types of components that can be assigned to the specified component.

    Declaration
    [ExcludeFromBurstCompatTesting("Takes managed Type")]
    public List<Type> GetAssignableComponentTypes(Type interfaceType)
    Parameters
    Type Name Description
    Type interfaceType

    The type to check.

    Returns
    Type Description
    List<Type>

    A new List object containing the System.Types that can be assigned to interfaceType.

    Remarks

    Assignable components include those with the same compile-time type and those that inherit from the same compile-time type.

    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)