docs.unity3d.com
    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
    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
    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.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023