Documentation

Unity Engine


Unity Engine


GetBuffer

Gets the dynamic buffer of an entity.
Read time 1 minuteLast updated a day ago

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule

GetBuffer<T>(Entity, bool)

Gets the dynamic buffer of an entity.
public DynamicBuffer<T> GetBuffer<T>(Entity entity, bool isReadOnly = false) where T : unmanaged, IBufferElementData

Parameters

entity

The entity.

isReadOnly

Specify whether the access to the component through this object is read only or read and write.

Returns

Type

Description

DynamicBuffer<T>The DynamicBuffer object for accessing the buffer contents.

GetBuffer<T>(SystemHandle, bool)

Gets the dynamic buffer of an entity associated with a system.
public DynamicBuffer<T> GetBuffer<T>(SystemHandle system, bool isReadOnly = false) where T : unmanaged, IBufferElementData

Parameters

The system handle.

isReadOnly

Specify whether the access to the component through this object is read only or read and write.

Returns

Type

Description

DynamicBuffer<T>The DynamicBuffer object for accessing the buffer contents.