Skip to content

LogFiltering

Elias Wennerberg edited this page Oct 4, 2026 · 2 revisions

Log Filtering

Console output is filterable by severity, Unity-editor-console style: info / warnings / errors.

How it works

Every line keeps its severity: Unity logs keep their real type, command output maps success to info and failure to error, system lines are untyped (always shown). Filtering hides lines from view only — history is retained.

UniTerminal.SetLogFilter(showLogs: false, showWarnings: true, showErrors: true);

More examples

Errors-only view for release playtesting, restored afterwards:

UniTerminal.SetLogFilter(showLogs: false, showWarnings: false, showErrors: true);
// ... reproduce the bug ...
UniTerminal.SetLogFilter(showLogs: true, showWarnings: true, showErrors: true);

Toggle buttons

Assign three Toggles (plus optional count TMP_Text labels) in the inspector's Log Filter Bar section. Toggling flips that severity live; counts show per-bucket totals capped at 999+.

Two inspector tints control the off-state look (both default white):

  • Filter Disabled Tint — applied to the toggle's targetGraphic when off; on-state restores your prefab's authored colors (including the full ColorBlock, so hover/press styling survives).
  • Filter Label Disabled Tint — applied to the count label when off.

Leave all slots empty to drive filtering purely from code.

Clone this wiki locally