Editor

Custom Unity Editor tooling for the Scriptable Factory system. Provides custom inspectors for the manager and registry singletons, a generic factory selector popup, and property drawers for data, pool, and spawner types.

Architecture

spinner

Editor Components

Component
Type
Draws / Inspects
Purpose

Custom Editor

Runtime monitor view — shows all active factories grouped by type

Custom Editor

Registry inspector — displays the registry table with ping-to-asset navigation

Selector Popup

Factory selection

Dropdown popup for picking a factory from the registry, filtered by type

Property Drawer

Foldable box rendering for data records on factory assets

Property Drawer

Runtime pool inspector with Instantiate/Spawn/Despawn/Destroy controls

Property Drawer

Full spawner editor with factory selection, data preview, variant picker, and field overrides

Key Patterns

Drawer Priority System

Odin uses [DrawerPriority] to resolve which drawer handles a given type. Higher priority wins:

Drawer
Priority
Constraint

FactorableDataDrawer<TData>

(0, 0, 3000)

where TData : FactorableData

FactorablePoolDrawer

(0, 0, 3000)

Concrete FactorablePool type

FactorableSpawnerDrawer<TObject, TData>

SuperPriority

where TObject : IFactorable<TData>

Shared UI Patterns

All editors and drawers use:

  • DrawGUI utility (Paragon.Editor) for consistent box/toolbar layout

  • SirenixEditorGUI.Foldout + BeginFadeGroup/EndFadeGroup for animated collapsible sections

  • DrawGUI.HorizontalToolbar() / VerticalToolbar() for toolbar-styled rows

Extension Pattern

To create a custom drawer for a FactorableData subclass with additional controls:

Dependencies

Dependency
Usage

Odin Inspector

OdinEditor, OdinValueDrawer<T>, OdinSelector<T>, SirenixEditorGUI, SirenixEditorFields

Paragon.Editor

DrawGUI utility, ParagonDrawer<T> base class

UnityEditor

CustomEditor, Selection, EditorGUIUtility, ObjectNames

See Also

Last updated