void AddCommandList( CommandList buffer, Stage stage, int order )

robot_2Generated
code_blocksInput

Description

The AddCommandList method is used to add a rendering command list to a camera component. This allows you to specify custom rendering commands that should be executed at a particular stage of the rendering process, with a specific order of execution.

Usage

To use the AddCommandList method, you need to provide the following parameters:

  • buffer: An instance of Sandbox.Rendering.CommandList that contains the rendering commands to be added.
  • stage: A Sandbox.Rendering.Stage value that specifies the stage of the rendering process where the command list should be executed.
  • order: An int that determines the order in which the command list should be executed relative to other command lists at the same stage.

Example

// Example of adding a command list to a camera component
CameraComponent cameraComponent = new CameraComponent();
Sandbox.Rendering.CommandList commandList = new Sandbox.Rendering.CommandList();
Sandbox.Rendering.Stage renderStage = Sandbox.Rendering.Stage.Opaque;
int executionOrder = 1;

cameraComponent.AddCommandList(commandList, renderStage, executionOrder);