Description
The DebugName
property of the CommandList
class in the Sandbox.Rendering
namespace is a public instance property that holds a string value. This property is used to assign or retrieve a name for debugging purposes. It can be useful for identifying and tracking specific command lists during rendering operations, especially when diagnosing issues or optimizing performance.
Usage
To use the DebugName
property, simply access it through an instance of the CommandList
class. You can set it to a descriptive string that helps you identify the command list during debugging sessions.
Example
// Create a new CommandList instance
CommandList commandList = new CommandList();
// Set the DebugName for the command list
commandList.DebugName = "MainRenderPass";
// Retrieve the DebugName
string debugName = commandList.DebugName;
// Output the DebugName
// Note: Avoid using Console.WriteLine in Sandbox
// Use a logging system or debugger to view the debug name
// Log.Debug(debugName);