Struct ComponentTypeSet
An immutable set of ComponentType values.
Namespace: Unity.Entities
Assembly: solution.dll
Syntax
[GenerateTestsForBurstCompatibility]
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
Name | Description |
---|---|
ComponentTypeSet(in FixedList128Bytes<ComponentType>) | Create an instance from a list of component types |
ComponentTypeSet(ComponentType) | Create an instance with one component type |
ComponentTypeSet(ComponentType, ComponentType) | Create an instance with two component types |
ComponentTypeSet(ComponentType, ComponentType, ComponentType) | Create an instance with three component types |
ComponentTypeSet(ComponentType, ComponentType, ComponentType, ComponentType) | Create an instance with five component types |
ComponentTypeSet(ComponentType, ComponentType, ComponentType, ComponentType, ComponentType) | Create an instance with five component types |
ComponentTypeSet(ComponentType[]) | Create an instance from a list of component types |
Properties
Name | Description |
---|---|
Length | The component type count |
Methods
Name | Description |
---|---|
GetComponentType(int) | Gets a ComponentType for the type stored at the index in the list. |
GetTypeIndex(int) | Get the type index of a component type within this list |