Method GetComponentTypes
GetComponentTypes(Allocator)
Gets the types of the components making up this archetype.
Declaration
public NativeArray<ComponentType> GetComponentTypes(Allocator allocator = Allocator.Temp)
Parameters
Type | Name | Description |
---|---|---|
Allocator | allocator | 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.
Declaration
public NativeArray<ComponentType> GetComponentTypes(AllocatorManager.AllocatorHandle allocator)
Parameters
Type | Name | Description |
---|---|---|
AllocatorManager.AllocatorHandle | allocator | 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.