docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetComponentSource

    GetComponentSource(Type, bool)

    Get the source container from which the component value is coming from.

    Declaration
    public TContainer GetComponentSource(Type componentType, bool dependenciesOnly = false)
    Parameters
    Type Name Description
    Type componentType

    The component type.

    bool dependenciesOnly

    If true, only look in dependencies, otherwise also look into this container.

    Returns
    Type Description
    TContainer

    A container if component is found, null otherwise.

    GetComponentSource<T>(bool)

    Get the source container from which the component value is coming from.

    Declaration
    public TContainer GetComponentSource<T>(bool dependenciesOnly = false) where T : TComponent
    Parameters
    Type Name Description
    bool dependenciesOnly

    If true, only look in dependencies, otherwise also look into this container.

    Returns
    Type Description
    TContainer

    A container if component is found, null otherwise.

    Type Parameters
    Name Description
    T

    The component 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)