GetComponentTypes
Gets the types of the components making up this archetype.
Read time 1 minuteLast updated a day ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
GetComponentTypes(Allocator)
Gets the types of the components making up this archetype.
public NativeArray<ComponentType> GetComponentTypes(Allocator allocator = Allocator.Temp)
Parameters
The allocation type to use for the returned NativeArray.
Returns
Type | Description |
|---|---|
| NativeArray<ComponentType> | A native array containing the ComponentType objects of this archetype. |
Remarks
The set of component types in an archetype cannot change; adding components to an entity or removing components from an entity changes the archetype of that entity (possibly resulting in the creation of a new archetype). The original archetype remains unchanged.
GetComponentTypes(AllocatorHandle)
Gets the types of the components making up this archetype.
public NativeArray<ComponentType> GetComponentTypes(AllocatorManager.AllocatorHandle allocator)
Parameters
The allocation type to use for the returned NativeArray.
Returns
Type | Description |
|---|---|
| NativeArray<ComponentType> | A native array containing the ComponentType objects of this archetype. |
Remarks
The set of component types in an archetype cannot change; adding components to an entity or removing components from an entity changes the archetype of that entity (possibly resulting in the creation of a new archetype). The original archetype remains unchanged.