CreateArchetype
Creates an archetype from a set of component types.
Read time 1 minuteLast updated 2 days ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
CreateArchetype(ComponentType[])
Creates an archetype from a set of component types.
[ExcludeFromBurstCompatTesting("Takes managed array")]public EntityArchetype CreateArchetype(params ComponentType[] types)
Parameters
The component types to include as part of the archetype.
Returns
Type | Description |
|---|---|
| EntityArchetype | The EntityArchetype object for the archetype. |
Remarks
Creates a new archetype in the ECS framework's internal type registry, unless the archetype already exists.
CreateArchetype(ReadOnlySpan<ComponentType>)
Creates an archetype from a set of component types.
public EntityArchetype CreateArchetype(ReadOnlySpan<ComponentType> types)
Parameters
The component types to include as part of the archetype.
Returns
Type | Description |
|---|---|
| EntityArchetype | The EntityArchetype object for the archetype. |
Remarks
Creates a new archetype in the ECS framework's internal type registry, unless the archetype already exists.
CreateArchetype(NativeArray<ComponentType>)
Creates an archetype from a set of component types.
public EntityArchetype CreateArchetype(NativeArray<ComponentType> types)
Parameters
The component types to include as part of the archetype.
Returns
Type | Description |
|---|---|
| EntityArchetype | The EntityArchetype object for the archetype. |
Remarks
Creates a new archetype in the ECS framework's internal type registry, unless the archetype already exists.