unity

Design Unity gameplay code with lifecycle-aware architecture and performance-safe patterns.

17|5|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/MonumentalSystems/Atlas-Agent-Teams --skill unity-monumentalsystems
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity
Source: https://github.com/MonumentalSystems/Atlas-Agent-Teams/tree/main/teams/game-dev/skills/unity
Command: npx skills add https://github.com/MonumentalSystems/Atlas-Agent-Teams --skill unity-monumentalsystems

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Unity projects often degrade when lifecycle usage, architecture, and performance practices are inconsistent, leading to fragile gameplay code and avoidable runtime issues.

Core Features & Use Cases

  • MonoBehaviour lifecycle guidance: Uses correct callback ordering (Awake/Start/Update/FixedUpdate/LateUpdate/OnDestroy) to prevent referencing objects before they’re ready.
  • Data-driven gameplay with ScriptableObjects: Encapsulates configuration and shared state (e.g., weapon stats) to reduce coupling and improve reuse.
  • Performance-safe gameplay patterns: Recommends object pooling, event channel design, caching references, and safe tagging/comparisons to cut GC pressure and runtime overhead.
  • Project structure & Unity conventions: Guides organizing Assets, Packages, ProjectSettings, and .asmdef-based modularization for large codebases.

Quick Start

Use the unity skill to design a pooled enemy spawner that uses ScriptableObjects for enemy stats and drives spawning via an event channel, following Unity lifecycle best practices.

Frequently Asked Questions about unity

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure Unity gameplay code with ScriptableObjects to reduce coupling?

Using ScriptableObjects in Unity encapsulates configuration and shared state, such as weapon stats, to reduce coupling and improve reuse across gameplay components. This data-driven approach separates configuration from behavior.

What's the best way to manage Unity MonoBehaviour lifecycle callbacks and prevent reference errors?

Managing the Unity MonoBehaviour lifecycle requires correct callback ordering, specifically Awake, Start, Update, and OnDestroy, to prevent referencing objects before they are ready. Proper callback usage ensures stable gameplay code execution.

How do I reduce GC pressure in Unity with object pooling and cached references?

Object pooling and caching references in Unity reduce GC pressure and runtime overhead by reusing instantiated objects instead of destroying them. This performance-safe pattern is essential for maintaining smooth gameplay loops.

Can I use event channels in Unity to drive runtime interactions without direct references?

Event channels in Unity drive runtime event-driven interactions without direct object references, decoupling gameplay systems. This architecture pattern works alongside ScriptableObjects to broadcast and listen for gameplay events safely.

How do I modularize a large Unity codebase using assembly definitions?

Modularize large Unity codebases by organizing Assets, Packages, and ProjectSettings with .asmdef assembly definitions. This structure enforces strict dependency boundaries between modules, improving compilation times and maintainability.

Why does my Unity code break when accessing components before they are initialized?

Unity code breaks when accessing components before initialization due to incorrect MonoBehaviour callback ordering. Referencing objects during Awake instead of Start, or failing to cache references, causes null reference exceptions and fragile gameplay.