Documentation

Unity Engine

Download Unity

Unity Engine

GetBufferRO<T>()

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

Definition

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

Returns

Type

Description

DynamicBuffer<T>The Buffer.

Remarks

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