unity-architecture

Advises on Unity gameplay architecture, module boundaries, decoupling, and refactor direction.

Updated Jun 21, 2026
One-click install
npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-architecture-du-qwq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-architecture
Source: https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications/tree/main/.agents/skills/unity-skills/skills/architecture
Command: npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-architecture-du-qwq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Unity projects often grow into tangled MonoBehaviour scripts with hidden execution-order bugs and unclear responsibilities. This Skill provides structured architecture guidance before you write structural code, helping you choose the smallest architecture that fits your project scope. ## Core Features & Use Cases - Scoped Architecture Planning: Recommends 3-7 modules with clear responsibilities based on whether the project is a prototype, small game, or long-lived product. - Execution Order & Guard Guidance: Explains how to make startup order explicit with a single Bootstrap script and how to write guard clauses in Update methods to prevent null-data bugs. - Layered Separation Advice: Defines boundaries between scene/bootstrap, gameplay logic, data/config assets, and presentation layers, including when to use ScriptableObjects versus plain C# classes. - Use Case: Before building a new gameplay system, ask for an architecture plan and receive a module breakdown, scene composition plan, data ownership rules, and a do-now/skip-now list that avoids over-engineering. ## Quick Start Ask the assistant to plan the architecture for your Unity game, describing your project scope and core gameplay loop.

Frequently Asked Questions about unity-architecture

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

FAQPage Schema
How do I structure a Unity project architecture?

Start by identifying your project scope (prototype, small game, or long-lived), then define the core loop and minimum runtime systems. Separate scene/bootstrap, gameplay logic, data assets, and presentation into 3-7 modules with one-line responsibilities each.

How to fix Unity script execution order problems?

Use a single Bootstrap script with [DefaultExecutionOrder(-10000)] as the only entry point that initializes managers explicitly. Prefer pull-based access where subscribers call GetValue() instead of publishers pushing data during Awake.

When should I use ScriptableObjects in Unity?

Use ScriptableObjects for authored configuration and shared static data, not as a default dump for runtime state. Keep reusable gameplay rules in plain C# classes and use thin MonoBehaviours only as composition bridges.

Why does my Unity Update method run with null data?

Update runs regardless of whether dependencies are ready, so add guard clauses at the top: check initialization flags, null data sources, and pause state before doing real work. Missing guards cause silent state corruption instead of safe no-ops.

When should I avoid heavy architecture frameworks in Unity?

Avoid framework-heavy architecture for prototypes and small games where iteration speed matters most. Prefer a small architecture that can grow, explicit dependencies, and simple module boundaries over textbook SOLID layering.