Documentation

Unity Engine

Download Unity

Unity Engine

AddCommandBuffer

Add a command buffer to be executed at a specified place.
Read time 2 minutesLast updated 6 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

AddCommandBuffer(LightEvent, CommandBuffer)

Add a command buffer to be executed at a specified place.
Warning
Deprecated. Light.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(LightEvent 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 light event (or even the same buffer can be added multiple times). To remove command buffer from execution, use Light.RemoveCommandBuffer.
Passing a shadow pass mask allows detailed control over which shadow passes will execute the buffer.
Important: This API is compatible only with the Built-In Render Pipeline.

AddCommandBuffer(LightEvent, CommandBuffer, ShadowMapPass)

Add a command buffer to be executed at a specified place.
Warning
Deprecated. Light.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(LightEvent evt, CommandBuffer buffer, ShadowMapPass shadowPassMask)

Parameters

When to execute the command buffer during rendering.

The buffer to execute.

shadowPassMask

A mask specifying which shadow passes to execute the buffer for.

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 light event (or even the same buffer can be added multiple times). To remove command buffer from execution, use Light.RemoveCommandBuffer.
Passing a shadow pass mask allows detailed control over which shadow passes will execute the buffer.
Important: This API is compatible only with the Built-In Render Pipeline.