docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method GetComponentsInAllScenes

    GetComponentsInAllScenes<T>(List<T>, bool)

    Retrieves all components of the given type in all loaded scenes

    Declaration
    public static void GetComponentsInAllScenes<T>(List<T> components, bool includeInactive = false) where T : Component
    Parameters
    Type Name Description
    List<T> components

    List that will be filled out with components retrieved

    bool includeInactive

    Should Components on inactive GameObjects be included in the found set?

    Type Parameters
    Name Description
    T

    The type of components to retrieve

    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)