ドキュメント

Unity Engine

Download Unity

Unity Engine

GetSharedComponentPtrRO(Entity, ComponentType)

Gets a read-only pointer to the value of a shared component of an entity.
読み終わるまでの所要時間 1 分最終更新 2日前

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
public static void* GetSharedComponentPtrRO(Entity entity, ComponentType type)

Parameters

entity

The entity.

Returns

Type

Description

void*A pointer to the value, which must not be written to.

Remarks

The value is TypeManager.TypeInfo.TypeSize bytes long, and is shared by every entity with the same value in the entity's world. The pointer is invalid after the next structural change in that world.