Struct SharedComponentTypeHandle<T>
A handle to a specific shared component type, used to access an Archetype
Namespace: Unity.Entities
Assembly: Unity.Entities.dll
Syntax
[NativeContainer]
[NativeContainerIsReadOnly]
public struct SharedComponentTypeHandle<T> where T : struct, ISharedComponentData
Type Parameters
Name | Description |
---|---|
T | Shared 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 SharedComponentTypeHandle, use Get
If the component type is not known at compile time, use Dynamic
Methods
Name | Description |
---|---|
To |
Returns the formatted FixedString "SharedComponentTypeHandle[type_name_here]". |
Update(System |
When a SharedComponentTypeHandle 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 SharedComponentTypeHandle 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. |