Description
The Enabled
property of the CommandList
class in the Sandbox.Rendering
namespace is a boolean property that indicates whether the command list is currently active and should be processed. When set to true
, the command list is enabled and will execute its commands. When set to false
, the command list is disabled and its commands will be ignored.
Usage
To use the Enabled
property, simply get or set its value on an instance of the CommandList
class. This property is useful for controlling the execution of rendering commands based on certain conditions or states within your application.
Example
// Example of using the Enabled property
// Create a new CommandList instance
CommandList commandList = new CommandList();
// Enable the command list
commandList.Enabled = true;
// Check if the command list is enabled
if (commandList.Enabled)
{
// Execute rendering commands
commandList.Blit(someMaterial);
}
// Disable the command list
commandList.Enabled = false;