Class ComponentUtils<T> | Unity Reflect | 1.1.0-preview.6
docs.unity.cn
    Show / Hide Table of Contents

    Class ComponentUtils<T>

    Special utility class for getting components in the editor without allocations

    Inheritance
    Object
    ComponentUtils<T>
    Namespace: Unity.Labs.Utils
    Syntax
    public static class ComponentUtils<T>
    Type Parameters
    Name Description
    T

    The type of component for which to be searched

    Methods

    GetComponent(GameObject)

    Declaration
    public static T GetComponent(GameObject gameObject)
    Parameters
    Type Name Description
    GameObject gameObject
    Returns
    Type Description
    T

    GetComponentInChildren(GameObject)

    Declaration
    public static T GetComponentInChildren(GameObject gameObject)
    Parameters
    Type Name Description
    GameObject gameObject
    Returns
    Type Description
    T
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX