unity-architecture

Advises on Unity gameplay and system architecture with scoped module and layering recommendations.

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-architecture-pikachu0310
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-architecture
Source: https://github.com/pikachu0310/codex-agent-ops-public/tree/main/.agents/skills/unity-skills/skills/architecture
Command: npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-architecture-pikachu0310

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Unity projects often accumulate tangled MonoBehaviour scripts, hidden execution-order dependencies, and over-engineered frameworks. This Skill provides structured architecture guidance so gameplay code stays decoupled, testable, and appropriately sized for the project's scope. ## Core Features & Use Cases - Scoped Architecture Recommendations: Classifies the project as prototype, small game, or long-lived, then recommends 3-7 modules with clear responsibilities. - Layering and Data Ownership Guidance: Separates scene/bootstrap, gameplay logic, data/config assets, and presentation, and clarifies when to use MonoBehaviours, plain C# classes, or ScriptableObjects. - Execution Order and Guard Patterns: Explains explicit bootstrap initialization, DefaultExecutionOrder usage, and Update guard clauses to prevent null-data bugs. - Use Case: Before generating a batch of gameplay scripts for a new Unity game, ask for an architecture plan to define module boundaries, communication rules, and what to keep simple versus abstract. ## Quick Start Ask the assistant to use the unity-architecture skill to propose a module structure and bootstrap plan for your Unity game before writing gameplay scripts.

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 classifying your project scope as prototype, small game, or long-lived, then define 3-7 modules with single responsibilities. Separate scene/bootstrap, gameplay logic, data assets, and presentation layers, keeping MonoBehaviours thin as composition bridges.

When should I use ScriptableObjects in Unity?

Use ScriptableObjects for authored configuration and shared static data, not as a default dump for runtime state. Reusable gameplay rules belong in plain C# classes, while scene-specific composition stays in MonoBehaviours.

How do I control script execution order in Unity?

Prefer a single Bootstrap script with [DefaultExecutionOrder(-10000)] that owns initialization and calls Init on managers. Reserve DefaultExecutionOrder for a few load-bearing singletons; needing it on many scripts signals an architecture problem.

Why does my Unity Update method run with null data?

Update runs regardless of whether dependencies are ready, so missing guard clauses cause stale or null data access. Add early-return checks for initialization state, null dependencies, and gameplay pause flags at the top of Update.

When should I avoid heavy architecture frameworks in Unity?

Avoid framework-heavy architecture for prototypes and small games where it slows iteration. Prefer a small architecture that can grow, adding abstraction layers only when project size clearly justifies them.