docs.unity.cn
    Show / Hide Table of Contents

    Method GetComponentTypes

    GetComponentTypes(Entity, Allocator)

    Gets an entity's component types.

    Declaration
    public NativeArray<ComponentType> GetComponentTypes(Entity entity, Allocator allocator = Allocator.Temp)
    Parameters
    Type Name Description
    Entity entity

    The entity.

    Allocator allocator

    The type of allocation for creating the NativeArray to hold the ComponentType objects.

    Returns
    Type Description
    NativeArray<ComponentType>

    An array of ComponentType containing all the types of components associated with the entity.

    GetComponentTypes(Entity, AllocatorManager.AllocatorHandle)

    Gets an entity's component types.

    Declaration
    public NativeArray<ComponentType> GetComponentTypes(Entity entity, AllocatorManager.AllocatorHandle allocator)
    Parameters
    Type Name Description
    Entity entity

    The entity.

    AllocatorManager.AllocatorHandle allocator

    The type of allocation for creating the NativeArray to hold the ComponentType objects.

    Returns
    Type Description
    NativeArray<ComponentType>

    An array of ComponentType containing all the types of components associated with the entity.

    GetComponentTypes(SystemHandle, Allocator)

    Gets a system entity's component types.

    Declaration
    public NativeArray<ComponentType> GetComponentTypes(SystemHandle system, Allocator allocator = Allocator.Temp)
    Parameters
    Type Name Description
    SystemHandle system

    The system handle.

    Allocator allocator

    The type of allocation for creating the NativeArray to hold the ComponentType objects.

    Returns
    Type Description
    NativeArray<ComponentType>

    An array of ComponentType containing all the types of components associated with the entity.

    GetComponentTypes(SystemHandle, AllocatorManager.AllocatorHandle)

    Gets a system entity's component types.

    Declaration
    public NativeArray<ComponentType> GetComponentTypes(SystemHandle system, AllocatorManager.AllocatorHandle allocator)
    Parameters
    Type Name Description
    SystemHandle system

    The system handle.

    AllocatorManager.AllocatorHandle allocator

    The type of allocation for creating the NativeArray to hold the ComponentType objects.

    Returns
    Type Description
    NativeArray<ComponentType>

    An array of ComponentType containing all the types of components associated with the entity.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Thursday, August 10, 2023