文档

Unity Engine

Unity Engine

GetSharedComponentTypeHandle<T>()

Manually gets the run-time type information required to access a shared component data in a chunk.
阅读时间1 分钟最后更新于 5 天前

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
public SharedComponentTypeHandle<T> GetSharedComponentTypeHandle<T>() where T : struct, ISharedComponentData

Returns

Type

Description

SharedComponentTypeHandle<T>An object representing the type information required to safely access shared component data stored in a chunk.

Remarks

Prefer using GetSharedComponentTypeHandle{T} in SystemAPI as it will cache in OnCreate for you and call .Update(this) at the call-site.