Skip to content

SusDiagnosticsPanel

SusDiagnosticsPanel

Editor / development overlay — UI tree, stats, and props inspector for Sus components.

Package

SusKit · Devtools (commercial)

Open in Playground

SusKit · Devtools

Props

NameTypeDefault
VisibleProp<bool>false
RefreshIntervalProp<float>2f

Slots

No slots.

Events

No public events.

Style hooks

USS class contract — override appearance without touching C#. States toggle via these classes:

  • sus-diag-panel
  • sus-diag-panel__close-btn
  • sus-diag-panel__content
  • sus-diag-panel__dump
  • sus-diag-panel__header
  • sus-diag-panel__header-title
  • sus-diag-panel__hint
  • sus-diag-panel__resize
  • sus-diag-panel__stat-key
  • sus-diag-panel__stat-row
  • sus-diag-panel__stat-val
  • sus-diag-panel__tab
  • sus-diag-panel__tab--active
  • sus-diag-panel__tab-content
  • sus-diag-panel__tabs
  • sus-diag-panel__tip
  • sus-diag-panel__tree-row
  • sus-diag-panel__tree-row--faded
  • sus-diag-panel__tree-row--hidden
  • sus-diag-panel__tree-row--selected
  • sus-diag-panel__tree-row--sus
  • sus-diag-panel__tree-row--ve

Usage

Set RootElement to the tree to inspect, then toggle Visible.

csharp
var panel = new SusDiagnosticsPanel();
panel.RootElement = canvas; // or app root VisualElement
panel.Visible.Value = true;
panel.RefreshInterval.Value = 2f;
host.Add(panel);
xml
<template>
  <sus:SusDiagnosticsPanel :Visible="Show.Value"
                           :RefreshInterval="Interval.Value" />
</template>

<script>
public Prop<bool> Show = new(true);
public Prop<float> Interval = new(2f);
// Assign RootElement in code (panel.RootElement = …).
</script>
Prop / fieldRole
VisibleShow / hide the panel
RefreshIntervalAuto-refresh period (seconds); tree skips rebuild if snapshot unchanged
RootElementRoot VisualElement to walk (code)
TargetComponentOptional focus for Props tab (code)

Notes

  • Tabs: UI Tree · Stats · Props — click a SusComponent (◆) in the tree to inspect props.
  • Intended for Editor / Development builds; not a buyer runtime surface.
  • Resize via the left-edge handle; close control sets Visible=false.