GetComponentTypes
Gets an entity's component types.
Read time 1 minuteLast updated a day ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
GetComponentTypes(Entity, Allocator)
Gets an entity's component types.
public NativeArray<ComponentType> GetComponentTypes(Entity entity, Allocator allocator = Allocator.Temp)
Parameters
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.
public NativeArray<ComponentType> GetComponentTypes(Entity entity, AllocatorManager.AllocatorHandle allocator)
Parameters
The entity.
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.
public NativeArray<ComponentType> GetComponentTypes(SystemHandle system, Allocator allocator = Allocator.Temp)
Parameters
The system handle.
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.
public NativeArray<ComponentType> GetComponentTypes(SystemHandle system, AllocatorManager.AllocatorHandle allocator)
Parameters
The system handle.
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. |