Interface IDebugData
Implementing this interface enables integration with Unity's Rendering debugger, providing a way to manage and control the state of debug data.
Namespace: UnityEngine .Rendering
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
public interface IDebugData
Remarks
Use the IDebugData
interface to register custom debug data. You can reset the data when necessary, which makes it suitable for debugging scenarios
where you need to clear or reset specific data. For example, when the application state changes or during gameplay session resets,
or when the Reset button is selected in the Rendering Debugger window in the Editor or at runtime.
Examples
public class MyDebugData : IDebugData
{
private int _value;
/// Constructor of the debug data that will receive the reset callback
public MyDebugData()
{
_value = 0;
}
public Action GetReset()
{
/// Specify the callback when the reset operation is being called.
return () => _value = 0; // Resets the value to 0
}
}
Methods
GetReset()
Provides the reset callback for resetting the debug data.
Declaration
Action GetReset()
Returns
Type | Description |
---|---|
Action | The reset callback |