Class DebugManager
Manager class for the Debug Window.
Inherited Members
Namespace: UnityEngine.Rendering
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
public sealed class DebugManager
Fields
refreshEditorRequested
Force an editor request.
Declaration
public bool refreshEditorRequested
Field Value
Type | Description |
---|---|
bool |
Properties
displayEditorUI
Is the debug editor window open.
Declaration
public bool displayEditorUI { get; set; }
Property Value
Type | Description |
---|---|
bool |
displayPersistentRuntimeUI
Displays the persistent runtime debug window.
Declaration
public bool displayPersistentRuntimeUI { get; set; }
Property Value
Type | Description |
---|---|
bool |
displayRuntimeUI
Displays the runtime version of the debug window.
Declaration
public bool displayRuntimeUI { get; set; }
Property Value
Type | Description |
---|---|
bool |
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 |
---|---|
bool |
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 |
---|---|
bool |
panels
List of currently registered debug panels.
Declaration
public ReadOnlyCollection<DebugUI.Panel> panels { get; }
Property Value
Type | Description |
---|---|
ReadOnlyCollection<DebugUI.Panel> |
Methods
FindPanelIndex(string)
Find the index of the panel from it's display name.
Declaration
public int FindPanelIndex(string displayName)
Parameters
Type | Name | Description |
---|---|---|
string | displayName | The display name of the panel to find. |
Returns
Type | Description |
---|---|
int | The index of the panel in the list. -1 if not found. |
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. |
GetItems(Flags)
Gets an DebugUI.Widget matching the given DebugUI.Flags
Declaration
public DebugUI.Widget[] GetItems(DebugUI.Flags flags)
Parameters
Type | Name | Description |
---|---|---|
DebugUI.Flags | flags | The flags of the widget |
Returns
Type | Description |
---|---|
Widget[] | Reference to the requested debug item. |
GetPanel(string, bool, int, bool)
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. |
bool | createIfNull | Create the panel if it does not exists. |
int | groupIndex | Group index. |
bool | 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 |
---|---|
int |
PanelIndex(string)
Returns the panel index
Declaration
public int PanelIndex(string displayName)
Parameters
Type | Name | Description |
---|---|---|
string | displayName | The displayname for the panel |
Returns
Type | Description |
---|---|
int | The index for the panel or -1 if not found. |
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(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(int)
Request DebugWindow to open the specified panel.
Declaration
public void RequestEditorWindowPanelIndex(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | Index of the debug window panel to activate. |
Reset()
Reset the debug window.
Declaration
public void Reset()
ToggleEditorUI(bool)
Toggle the debug window.
Declaration
[Obsolete("Use DebugManager.instance.displayEditorUI property instead. #from(23.1)")]
public void ToggleEditorUI(bool open)
Parameters
Type | Name | Description |
---|---|---|
bool | 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<bool> |
onSetDirty
Callback called when the debug window is dirty.
Declaration
public event Action onSetDirty
Event Type
Type | Description |
---|---|
Action |
windowStateChanged
Event that is raised when a window state is changed
Declaration
public static event Action<DebugManager.UIMode, bool> windowStateChanged
Event Type
Type | Description |
---|---|
Action<DebugManager.UIMode, bool> |