ドキュメント

Unity Engine

Download Unity

Unity Engine

GetComponentDataPtrRW(Entity, ComponentType)

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

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
public static void* GetComponentDataPtrRW(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.

Remarks

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