docs.unity.cn
    Show / Hide Table of Contents

    Method GetComponentObject

    GetComponentObject<T>(Entity)

    Gets the managed UnityEngine.Component object from an entity.

    Declaration
    [NotBurstCompatible]
    public T GetComponentObject<T>(Entity entity)
    Parameters
    Type Name Description
    Entity entity

    The entity.

    Returns
    Type Description
    T

    The managed object, cast to type T.

    Type Parameters
    Name Description
    T

    The type of the managed object.

    GetComponentObject<T>(Entity, ComponentType)

    Declaration
    [NotBurstCompatible]
    public T GetComponentObject<T>(Entity entity, ComponentType componentType)
    Parameters
    Type Name Description
    Entity entity
    ComponentType componentType
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Wednesday, July 6, 2022
    Terms of use