docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ComponentHolderProtocol

    Inheritance
    object
    ComponentHolderProtocol
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.VisualScripting
    Assembly: Unity.VisualScripting.Core.dll
    Syntax
    public static class ComponentHolderProtocol

    Methods

    AddComponent<T>(Object)

    Declaration
    public static T AddComponent<T>(this Object uo) where T : Component
    Parameters
    Type Name Description
    Object uo
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GameObject(Object)

    Declaration
    public static GameObject GameObject(this Object uo)
    Parameters
    Type Name Description
    Object uo
    Returns
    Type Description
    GameObject

    GetComponent(Object, Type)

    Declaration
    public static Component GetComponent(this Object uo, Type type)
    Parameters
    Type Name Description
    Object uo
    Type type
    Returns
    Type Description
    Component

    GetComponentInChildren(Object, Type)

    Declaration
    public static Component GetComponentInChildren(this Object uo, Type type)
    Parameters
    Type Name Description
    Object uo
    Type type
    Returns
    Type Description
    Component

    GetComponentInChildren<T>(Object)

    Declaration
    public static T GetComponentInChildren<T>(this Object uo)
    Parameters
    Type Name Description
    Object uo
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetComponentInParent(Object, Type)

    Declaration
    public static Component GetComponentInParent(this Object uo, Type type)
    Parameters
    Type Name Description
    Object uo
    Type type
    Returns
    Type Description
    Component

    GetComponentInParent<T>(Object)

    Declaration
    public static T GetComponentInParent<T>(this Object uo)
    Parameters
    Type Name Description
    Object uo
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetComponent<T>(Object)

    Declaration
    public static T GetComponent<T>(this Object uo)
    Parameters
    Type Name Description
    Object uo
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetComponents(Object, Type)

    Declaration
    public static Component[] GetComponents(this Object uo, Type type)
    Parameters
    Type Name Description
    Object uo
    Type type
    Returns
    Type Description
    Component[]

    GetComponentsInChildren(Object, Type)

    Declaration
    public static Component[] GetComponentsInChildren(this Object uo, Type type)
    Parameters
    Type Name Description
    Object uo
    Type type
    Returns
    Type Description
    Component[]

    GetComponentsInChildren<T>(Object)

    Declaration
    public static T[] GetComponentsInChildren<T>(this Object uo)
    Parameters
    Type Name Description
    Object uo
    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T

    GetComponentsInParent(Object, Type)

    Declaration
    public static Component[] GetComponentsInParent(this Object uo, Type type)
    Parameters
    Type Name Description
    Object uo
    Type type
    Returns
    Type Description
    Component[]

    GetComponentsInParent<T>(Object)

    Declaration
    public static T[] GetComponentsInParent<T>(this Object uo)
    Parameters
    Type Name Description
    Object uo
    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T

    GetComponents<T>(Object)

    Declaration
    public static T[] GetComponents<T>(this Object uo)
    Parameters
    Type Name Description
    Object uo
    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T

    GetOrAddComponent<T>(Object)

    Declaration
    public static T GetOrAddComponent<T>(this Object uo) where T : Component
    Parameters
    Type Name Description
    Object uo
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    IsComponentHolder(Object)

    Declaration
    public static bool IsComponentHolder(this Object uo)
    Parameters
    Type Name Description
    Object uo
    Returns
    Type Description
    bool

    IsComponentHolderType(Type)

    Declaration
    public static bool IsComponentHolderType(Type type)
    Parameters
    Type Name Description
    Type type
    Returns
    Type Description
    bool
    In This Article
    Back to top
    Copyright © 2025 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)