Skip to content

Gizmos

Editor-only Scene-view drawing that is not attached to a GameObject — [DrawGizmo] callbacks, overlays driven from an editor window, and similar.

Purpose

Quick visual feedback while testing systems in the Editor.

A component does not belong here

Nothing under this folder is covered by an asmdef, so Unity compiles it into the predefined Assembly-CSharp-Editor — and any script under a folder named Editor is editor-only. That is right for a [DrawGizmo] callback and wrong for a MonoBehaviour a designer attaches to a scene object: the component works while authoring and then ships as a missing script, logging an error per instance when the scene loads in the player.

ShieldDebugger was exactly that, and now lives in the Health runtime assembly at Runtime/Systems/Health/Diagnostics/, with its drawing behind #if UNITY_EDITOR. If you add a debug visual that a user attaches to an object, put the component in the relevant runtime assembly and guard the drawing — not the type.

Scripts here are guarded with #if UNITY_EDITOR && REV_<SYSTEM>_PRESENT so they compile only when the relevant module is present.