mcpField
U
unity-abstract-factory

unity-abstract-factory

github.com/muharremtozanDevelopment1751 installsUpdated 22w ago
Repository

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

  1. 01Generic type-safe factory interface
  2. 02ScriptableObject-based factories
  3. 03Prefab-based GameObject spawning
  4. 04Equipment factory example

Use cases

  1. 01Create families of related objects
  2. 02Spawn GameObjects from prefabs
  3. 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-factory

After 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.txt
Factory.cs.txt
references/
guide.md

Details

From the project README

Unity Abstract Factory

Minimal factory pattern implementation for object creation.

Core Features

  1. Generic Interface: IFactory<T> for type-safe creation
  2. SO-Based Factories: Data-driven object families
  3. 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