文档

Unity Engine

Unity Engine

GetSharedComponent

Gets the current value of an unmanaged shared component.
阅读时间1 分钟最后更新于 19 天前

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.