ドキュメント

Unity Engine

Download Unity

Unity Engine

GetComponentDataPtrRO(Entity, ComponentType)

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

Definition

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

Parameters

entity

The entity.

An unmanaged IComponentData type that isn't zero-sized.

Returns

Type

Description

void*A pointer to the component's data, which must not be written to.

Remarks

The data is TypeManager.TypeInfo.SizeInChunk bytes long. The pointer is invalid after the next structural change in the entity's world.