The IScriptableFactory interface hierarchy defines the contract for all factories in the Scriptable Factory system. Three levels of interface progressively add capabilities: base lifecycle, object pooling, and data-driven variant spawning.
IScriptableFactory
Base
Lifecycle (Initialize, Start, OnQuit) and Unity references (gameObject, transform)
Initialize
Start
OnQuit
gameObject
transform
Pooling
IScriptableFactory<TObject>
Object creation, pooling (Spawn, Despawn, Destroy), and pool capacity
Spawn
Despawn
Destroy
Data
IScriptableFactory<TObject, TData>
Data variants, data-driven spawning, and variant enumeration
Base factory contract — lifecycle and Unity references
Adds pooled object creation and lifecycle management
Adds data-driven variant spawning and data retrieval
ScriptableFactory — abstract base class implementing IScriptableFactory
Factory Subsystem — subsystem overview
Last updated 1 month ago