Documentation

Unity Engine

Download Unity

Unity Engine

GetBufferRW<T>()

Gets the Buffer of T elements, an IBufferElementData, on this GameObject for reading and writing.
Read time 1 minuteLast updated 6 hours ago

Definition

public DynamicBuffer<T> GetBufferRW<T>() where T : unmanaged, IBufferElementData

Returns

Type

Description

DynamicBuffer<T>The Buffer.

Remarks

Marks the Buffer as changed. Throws an
ArgumentException
if the GameObject has been destroyed or doesn't have the Buffer.
Waits for the jobs that read or write
T
to complete. To avoid the wait, access
T
in a job through a
Unity.Entities.BufferLookup
. The job then runs after the jobs that read or write
T
, instead of the main thread waiting for them.