Editor
Editor tooling for ParagonBehaviour and its subsystem/component architecture. Provides custom Inspector rendering, a context menu for toggling subsystems and debug mode, and a visual UI Toolkit-based drawer for managing subsystem components.
Architecture
Key Concepts
ParagonBehaviourEditor
Custom Odin-based Inspector editor for all ParagonBehaviour subclasses. Manages the subsystem property and debug toggle.
ParagonBehaviourContextMenu
Injects a gear icon into the editor header of every ParagonBehaviour. Provides context menu items for toggling subsystems and debug mode.
ParagonSubsystemDrawer
UI Toolkit-based Odin property drawer that renders the subsystem's component list with expandable toolboxes and an add/remove workflow.
ParagonSubsystemSelector
Popup type selector (using Odin's GenericSelector<Type>) for picking which component type to add to a subsystem.
How It Works
Header Context Menu —
ParagonBehaviourContextMenuusesEditorHeaderItemInjectorto add a gear icon to everyParagonBehaviourInspector header. Clicking it reveals a dropdown with "Use Subsystem" (if applicable) and "Enable Debug" toggles.Subsystem Toggle — When "Use Subsystem" is toggled,
ParagonBehaviourEditor.EnableSubsystem()creates a newParagonSubsystem<T>instance and assigns it to the behaviour's serializedsubsystemfield. Disabling nulls it out.Component Drawing — When a subsystem is active,
ParagonSubsystemDrawerrenders eachIParagonComponentin aToolboxwith expand/collapse, remove buttons, and right-click context menus (copy/paste/reset). The "+" button opensParagonSubsystemSelector.Component Selection —
ParagonSubsystemSelectorqueriesTypeCachefor all concrete types implementingIParagonComponent<TBehaviour>that aren't already present, displays them in a searchable popup, and adds the selected type to the subsystem.
Classes
Injects header context menu for subsystem and debug toggles
Custom Inspector editor for all ParagonBehaviour types
UI Toolkit drawer for subsystem component management
Type selection popup for adding components
Last updated