Documentation

Unity Engine


Unity Engine


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

chunkSharedComponentData

An object containing type and job safety information. To create this object, call ComponentSystemBase.GetSharedComponentTypeHandle.

entityManager

The EntityManager through which the shared component value should be retrieved.

Returns

Type

Description

TThe 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

chunkSharedComponentData

An object containing type and job safety information. To create this object, call ComponentSystemBase.GetSharedComponentTypeHandle.

Returns

Type

Description

TThe 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

chunkSharedComponentData

An object containing type and job safety information. To create this object, call ComponentSystemBase.GetSharedComponentTypeHandle.

Returns

Type

Description

TThe shared component value.