Struct ComponentTypeHandle<T>
A handle to a specific component type, used to access an Archetype
Namespace: Unity.Entities
Assembly: Unity.Entities.dll
Syntax
[NativeContainer]
[NativeContainerSupportsMinMaxWriteRestriction]
public struct ComponentTypeHandle<T>
Type Parameters
Name | Description |
---|---|
T | The component type |
Remarks
Passing a type handle to a job automatically registers the job as a reader or writer of that type, which allows the DOTS safety system to detect potential race conditions between concurrent jobs which access the same component type.
To create a ComponentTypeHandle, use Get
If the component type is not known at compile time, use Dynamic
Properties
Name | Description |
---|---|
Global |
The global system version for which this handle is valid. |
Is |
Reports whether this type handle was created in read-only mode. |
Methods
Name | Description |
---|---|
To |
Returns the formatted FixedString "ComponentTypeHandle[type_name_here]". |
Update(System |
When a ComponentTypeHandle is cached by a system across multiple system updates, calling this function inside the system's OnUpdate() method performs the minimal incremental updates necessary to make the type handle safe to use. |
Update(ref System |
When a ComponentTypeHandle is cached by a system across multiple system updates, calling this function inside the system's OnUpdate() method performs the minimal incremental updates necessary to make the type handle safe to use. |