SetBatchBuffer(BatchID, GraphicsBufferHandle)
Change the GraphicsBuffer associated with the given batch.
Read time 1 minuteLast updated 3 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
public void SetBatchBuffer(BatchID batchID, GraphicsBufferHandle buffer)
Parameters
Unity changes the batch with this ID.
The of the to be associated with the batch.
GraphicsBufferHandleGraphicsBufferRemarks
You can call this method at any time, but Unity doesn't apply the change immediately. Unity applies the change the next time it starts a culling pass, before it calls . Until then, draw commands that Unity has already generated still use the previous buffer.
OnPerformCullingDon't dispose of the previous in the same frame that you call this method. Instead, dispose of it in the next frame, for example in the next call. If Unity renders draw commands that refer to a disposed buffer, the result is undefined.
GraphicsBufferUpdate