GetSharedComponent
Gets the current value of an unmanaged shared component.
Read time 1 minuteLast updated 3 days ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
GetSharedComponent<T>(SharedComponentTypeHandle<T>, EntityManager)
Gets the current value of an unmanaged shared component.
public readonly T GetSharedComponent<T>(SharedComponentTypeHandle<T> chunkSharedComponentData, EntityManager entityManager) where T : unmanaged, ISharedComponentData
Parameters
An object containing type and job safety information. To create this object, call ComponentSystemBase.GetSharedComponentTypeHandle.
The EntityManager through which the shared component value should be retrieved.
Returns
Type | Description |
|---|---|
| T | The shared component value. |
GetSharedComponent<T>(SharedComponentTypeHandle<T>)
Gets the current value of an unmanaged shared component.
public readonly T GetSharedComponent<T>(SharedComponentTypeHandle<T> chunkSharedComponentData) where T : unmanaged, ISharedComponentData
Parameters
An object containing type and job safety information. To create this object, call ComponentSystemBase.GetSharedComponentTypeHandle.
Returns
Type | Description |
|---|---|
| T | The shared component value. |
GetSharedComponent<T>(SharedComponentTypeHandle<T>)
Gets the current value of an unmanaged shared component.
public readonly T GetSharedComponent<T>(ref SharedComponentTypeHandle<T> chunkSharedComponentData) where T : unmanaged, ISharedComponentData
Parameters
An object containing type and job safety information. To create this object, call ComponentSystemBase.GetSharedComponentTypeHandle.
Returns
Type | Description |
|---|---|
| T | The shared component value. |