Documentation

Unity Engine

Download Unity

Unity Engine

AddCommandBuffer(CameraEvent, CommandBuffer)

Add a command buffer to be executed at a specified place.
Read time 1 minuteLast updated 7 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
Warning
Deprecated. Camera.AddCommandBuffer is deprecated and will be removed in a future release. It has no effect because the Built-In Render Pipeline is removed. To inject rendering commands, use a ScriptableRenderPass in the Universal Render Pipeline (URP) or a Custom Pass in the High Definition Render Pipeline (HDRP) instead. #from(7000.0)
public void AddCommandBuffer(CameraEvent evt, CommandBuffer buffer)

Parameters

When to execute the command buffer during rendering.

The buffer to execute.

Remarks

AddCommandBuffer
is deprecated and will be removed in a future release. It has no effect because the Built-In Render Pipeline is removed. To inject rendering commands, use a ScriptableRenderPass in the Universal Render Pipeline (URP) or a Custom Pass in the High Definition Render Pipeline (HDRP) instead. Multiple command buffers can be set to execute at the same camera event (or even the same buffer can be added multiple times). To remove command buffer from execution, use Camera.RemoveCommandBuffer. This API is only available with the Built-in renderer.