ComponentTypeSet
An immutable set of ComponentType values.
Read time 1 minuteLast updated a day ago
Definition
- Type: Struct
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
public readonly struct ComponentTypeSet
Remarks
Max numbers of types is 15 (the capacity of FixedList64Bytes<T> of 32-bit integers).
Values in the list are sorted by their internal type index.
Only the types themselves are stored, not any access modes.
Cannot contain multiple ComponentType values with the same type index (safety checks in the constructors will throw an exception).
Constructors
Constructor | Description |
|---|---|
| ComponentTypeSet(Unity.Collections.FixedList128Bytes{Unity.Entities.ComponentType}@) | Create an instance from a list of component types |
| ComponentTypeSet(Unity.Entities.ComponentType) | Create an instance with one component type |
| ComponentTypeSet(Unity.Entities.ComponentType,Unity.Entities.ComponentType) | Create an instance with two component types |
| ComponentTypeSet(Unity.Entities.ComponentType,Unity.Entities.ComponentType,Unity.Entities.ComponentType) | Create an instance with three component types |
| ComponentTypeSet(Unity.Entities.ComponentType,Unity.Entities.ComponentType,Unity.Entities.ComponentType,Unity.Entities.ComponentType) | Create an instance with four component types |
| ComponentTypeSet(Unity.Entities.ComponentType,Unity.Entities.ComponentType,Unity.Entities.ComponentType,Unity.Entities.ComponentType,Unity.Entities.ComponentType) | Create an instance with five component types |
| ComponentTypeSet(Unity.Entities.ComponentType[]) | Create an instance from a list of component types |
Properties
Property | Description |
|---|---|
| Length | The component type count |
Methods
Method | Description |
|---|---|
| GetComponentType | Gets a ComponentType for the type stored at the index in the list. |
| GetTypeIndex | Get the type index of a component type within this list |