docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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

    Extension Methods

    ReflectionUtils.GetField(object, string)
    ReflectionUtils.GetFields(object)
    ReflectionUtils.Invoke(object, string, params object[])
    ReflectionUtils.SetField(object, string, object)
    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, T)
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)