FactoryCreator
Editor window for creating and managing ScriptableFactory scripts and assets. Provides a unified interface for scaffolding new factories and viewing existing ones.
Definition
Namespace: Paragon.Core.ScriptableFactory.Editor
Assembly: Paragon.Editor.dll
public partial class ScriptableFactoryCreator : OdinMenuEditorWindowInheritance: OdinMenuEditorWindow → ScriptableFactoryCreator
Overview
The Factory Creator is an editor window that displays a tree view of all factory types in the project. It allows:
Viewing the inheritance hierarchy of factory scripts
Creating new factory script types (derived from existing ones)
Creating new factory asset instances
Inspecting factory configurations
Usage
Access via menu: Assets > Create > Scriptable Factory > Open Creator
Or call programmatically:
Methods
ShowWindow()
Opens the Factory Creator window.
Nested Types
The ScriptableFactoryCreator is implemented as a partial class with several private nested types that handle specific functionality.
FactoryMenu (Abstract Base)
Base class for menu items in the factory tree view.
Properties
Creator
ScriptableFactoryCreator
Parent creator window
FactoryType
Type
The factory type this menu represents
MenuItem
OdinMenuItem
The Odin menu tree item
MenuTitle
string
Display title
MenuName
string
Menu item name
MenuPath
string
Full path in tree
Methods
OnOpened()
Called when menu item is selected
OnClosed()
Called when menu item is deselected
OnInspectorGUI()
Draws the inspector content
FactoryScriptMenu
Menu item for factory script types. Displays script information and provides creation tools.
Behavior
Displays the MonoScript asset header
Shows default script import settings
Provides a collapsible creator panel for:
Creating new derived factory scripts (for generic factories)
Creating new factory asset instances (for concrete factories)
FactoryObjectMenu
Menu item for factory asset instances. Displays and edits factory configuration.
Behavior
Displays the ScriptableObject asset header (clickable to ping in Project)
Shows the factory inspector via
ScriptableFactoryEditorManages a
PropertyTreefor Odin serialization
FactoryCreatorPanel (Abstract Base)
Base class for creation panels shown in FactoryScriptMenu.
Properties
scriptMenu
FactoryScriptMenu
Parent script menu
Methods
OnEnable()
Called when panel is activated
Draw()
Renders the panel UI
OnDisable()
Called when panel is deactivated
FactoryScriptCreatorPanel
Panel for creating new factory script files derived from a generic factory type.
Features
Folder path selection with persistence
Factory script name input with validation
Factorable object type dropdown (filtered by constraints)
Factorable data type dropdown (filtered by constraints)
Generates a complete C# script file with:
Proper namespace
Type constraints matching the parent factory
Standard region structure
FactoryObjectCreatorPanel
Panel for creating new factory asset instances from a concrete factory type.
Features
Folder path selection with persistence
Asset name input with validation
Creates a ScriptableObject asset
Sets the factory icon
Auto-selects and pings the created asset
Navigates to the new asset in the Creator tree
Architecture
See Also
Last updated
Was this helpful?