Unity Command Pattern

Encapsulate actions as objects for queuing, undo/redo, and async execution.

muharremtozan b48abde 3 files · 3.3 KB Updated

File contents

Unity Command Pattern

Minimal command pattern with async support.

Core Features

  1. Async Interface: ICommand with Task-based execution
  2. SO Commands: Data-driven actions for simple cases
  3. Command Queue: Sequential execution system

Core Files (1 file)

  • Command.cs.txt: Complete command pattern (interface + SO + queue)

Usage

Implement ICommand for complex logic, or inherit CommandSO for inspector-configurable actions.

muharremtozan/unity-agent-skills/tree/main/unity-command-pattern commit b48abde6e8

Frequently asked questions

npx skillmds@latest add muharremtozan/unity-command-pattern