About unity-abstract-factory
unity-abstract-factory is a minimal Unity skill providing factory-pattern code for object creation. It includes a generic, type-safe interface, data-driven ScriptableObject factories, and a prefab factory for spawning GameObjects.
Key features
- 01Generic type-safe factory interface
- 02ScriptableObject-based factories
- 03Prefab-based GameObject spawning
- 04Equipment factory example
Use cases
- 01Create families of related objects
- 02Spawn GameObjects from prefabs
- 03Build a themed equipment factory
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ muharremtozan/ unity-agent-skills --skill unity-abstract-factoryAfter installing, type/unity-abstract-factoryin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
assets/code/EquipmentFactory.cs.txtFactory.cs.txtreferences/guide.mdDetails
From the project READMEUnity Abstract Factory
Minimal factory pattern implementation for object creation.
Core Features
- Generic Interface:
IFactory<T>for type-safe creation - SO-Based Factories: Data-driven object families
- Simple Prefab Factory: Quick GameObject spawning
Core Files (2 files)
Factory.cs.txt: Complete factory pattern (interface + SO base + prefab factory)EquipmentFactory.cs.txt: Example themed factory implementation
Usage
Inherit from Factory<T> for complex families, or use PrefabFactory for simple spawning.
Comments
Markdown supported