ドキュメント

Unity Engine

Download Unity

Unity Engine

GetChunkComponentDataPtrRO(Entity, ComponentType)

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

Definition

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

Parameters

entity

The entity.

A chunk component type, such as ComponentType.ChunkComponent returns, of 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 value lives on the chunk's meta entity, and is shared by every entity in the chunk. The data is TypeManager.TypeInfo.SizeInChunk bytes of the component's type. The pointer is invalid after the next structural change in the entity's world.