Class DebugManager
Manager class for the Debug Window.
Namespace: UnityEngine.Rendering
Syntax
public sealed class DebugManager
Fields
refreshEditorRequested
Force an editor request.
Declaration
public bool refreshEditorRequested
Field Value
Type | Description |
---|---|
Boolean |
Properties
displayEditorUI
Is the debug editor window open.
Declaration
public bool displayEditorUI { get; }
Property Value
Type | Description |
---|---|
Boolean |
displayPersistentRuntimeUI
Displays the persistent runtime debug window.
Declaration
public bool displayPersistentRuntimeUI { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
displayRuntimeUI
Displays the runtime version of the debug window.
Declaration
public bool displayRuntimeUI { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
enableRuntimeUI
Controls whether runtime UI can be enabled. When this is set to false, there will be no overhead from debug GameObjects or runtime initialization.
Declaration
public bool enableRuntimeUI { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
instance
Global instance of the DebugManager.
Declaration
public static DebugManager instance { get; }
Property Value
Type | Description |
---|---|
DebugManager |
isAnyDebugUIActive
Is any debug window or UI currently active.
Declaration
public bool isAnyDebugUIActive { get; }
Property Value
Type | Description |
---|---|
Boolean |
panels
List of currently registered debug panels.
Declaration
public ReadOnlyCollection<DebugUI.Panel> panels { get; }
Property Value
Type | Description |
---|---|
ReadOnlyCollection<DebugUI.Panel> |
Methods
GetItem(String)
Get a Debug Item.
Declaration
public DebugUI.Widget GetItem(string queryPath)
Parameters
Type | Name | Description |
---|---|---|
String | queryPath | Path of the debug item. |
Returns
Type | Description |
---|---|
DebugUI.Widget | Reference to the requested debug item. |
GetPanel(String, Boolean, Int32, Boolean)
Returns a debug panel.
Declaration
public DebugUI.Panel GetPanel(string displayName, bool createIfNull = false, int groupIndex = 0, bool overrideIfExist = false)
Parameters
Type | Name | Description |
---|---|---|
String | displayName | Name of the debug panel. |
Boolean | createIfNull | Create the panel if it does not exists. |
Int32 | groupIndex | Group index. |
Boolean | overrideIfExist | Replace an existing panel. |
Returns
Type | Description |
---|---|
DebugUI.Panel |
GetState()
Get hashcode state of the Debug Window.
Declaration
public int GetState()
Returns
Type | Description |
---|---|
Int32 |
ReDrawOnScreenDebug()
Request the runtime debug UI be redrawn on the next update.
Declaration
public void ReDrawOnScreenDebug()
RefreshEditor()
Refresh the debug window.
Declaration
public void RefreshEditor()
RegisterData(IDebugData)
Register debug data.
Declaration
public void RegisterData(IDebugData data)
Parameters
Type | Name | Description |
---|---|---|
IDebugData | data | Data to be registered. |
RemovePanel(String)
Remove a debug panel.
Declaration
public void RemovePanel(string displayName)
Parameters
Type | Name | Description |
---|---|---|
String | displayName | Name of the debug panel to remove. |
RemovePanel(DebugUI.Panel)
Remove a debug panel.
Declaration
public void RemovePanel(DebugUI.Panel panel)
Parameters
Type | Name | Description |
---|---|---|
DebugUI.Panel | panel | Reference to the debug panel to remove. |
RequestEditorWindowPanelIndex(Int32)
Request DebugWindow to open the specified panel.
Declaration
public void RequestEditorWindowPanelIndex(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | Index of the debug window panel to activate. |
Reset()
Reset the debug window.
Declaration
public void Reset()
ToggleEditorUI(Boolean)
Toggle the debug window.
Declaration
public void ToggleEditorUI(bool open)
Parameters
Type | Name | Description |
---|---|---|
Boolean | open | State of the debug window. |
UnregisterData(IDebugData)
Register debug data.
Declaration
public void UnregisterData(IDebugData data)
Parameters
Type | Name | Description |
---|---|---|
IDebugData | data | Data to be registered. |
Events
onDisplayRuntimeUIChanged
Callback called when the runtime UI changed.
Declaration
public event Action<bool> onDisplayRuntimeUIChanged
Event Type
Type | Description |
---|---|
Action<Boolean> |
onSetDirty
Callback called when the debug window is dirty.
Declaration
public event Action onSetDirty
Event Type
Type | Description |
---|---|
Action |