Factory
Custom Unity Editor tooling for the ScriptableFactory subsystem. Provides a custom Odin inspector that renders factory assets with a styled title box, grouped settings, and system property sections.
Architecture
Editor Components
Custom Editor
Styled factory inspector with title box, settings group, and system properties
Key Patterns
Two-Section Layout
The inspector divides factory properties into two visual groups:
Factory Settings — All user-defined properties (fields not in the
systemPropertieslist) are drawn inside a styled box with a header label.System Properties — The internal properties (
factorablePool,data,dataVariantSystem) are drawn separately below the settings box.
Static DrawFactoryInspector
ScriptableFactoryEditor.DrawFactoryInspector(PropertyTree) is a static method, allowing other editors to reuse the factory inspector layout without inheriting from ScriptableFactoryEditor. Pass any PropertyTree rooted on a ScriptableFactory to render the standard two-section layout.
Generic Constraint Display
The inspector automatically resolves the factory's generic type arguments via reflection and displays them as a subtitle beneath the asset name (e.g., (EnemyObject, EnemyData)), giving designers immediate visibility into the factory's type constraints.
Dependencies
Odin Inspector
OdinEditor, PropertyTree, InspectorProperty
Paragon.Editor
DrawGUI utility for layout, title box, and styling helpers
UnityEditor
CustomEditor, CanEditMultipleObjects
See Also
Scriptable Factory — system overview
ScriptableFactory — runtime factory class
Variant Editor — editor tooling for the data variant subsystem
Last updated