docs.unity3d.com
Search Results for

    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, 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, 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.

    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)