docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetComponents

    GetComponents()

    Get a flatten list of all components recursively from this container and its dependencies. Throws if a component type is not in UsedComponents list.

    Declaration
    public IEnumerable<IBuildComponent> GetComponents()
    Returns
    Type Description
    IEnumerable<IBuildComponent>

    The list of components.

    GetComponents(Type)

    Get a flatten list of all components recursively from this container and its dependencies, that matches Type. Throws if component type is not in UsedComponents list.

    Declaration
    public IEnumerable<IBuildComponent> GetComponents(Type type)
    Parameters
    Type Name Description
    Type type

    Type of the components.

    Returns
    Type Description
    IEnumerable<IBuildComponent>

    The list of components.

    GetComponents<T>()

    Get a flatten list of all components recursively from this container and its dependencies, that matches T. Throws if component type is not in UsedComponents list.

    Declaration
    public IEnumerable<T> GetComponents<T>() where T : IBuildComponent
    Returns
    Type Description
    IEnumerable<T>

    The list of components.

    Type Parameters
    Name Description
    T

    Type of the components.

    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)