用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Besty0728/Unity-Skills --skill unity-architecture命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Automate the Unity Editor through a local REST API — create and edit scripts, build scenes and prefabs, manage assets/materials/lighting, run tests, and drive hundreds of Editor operations across modules. Use when the user wants to actually operate the Unity Editor from chat — create or modify GameObjects/scripts/scenes/assets, batch-edit, or run Editor automation — in any language. Not needed for conceptual Unity Q&A that touches no Editor state — read the matching advisory doc under skills/ instead. 当用户要从对话里实际操作 Unity 编辑器(创建/修改/批量编辑/运行测试)时使用,任何语言均可触发;纯概念问答无需本协议。
Unified batch and async-job orchestration
Index of all Unity Skills modules with per-module mode labels (SA/FA/Mixed). Use to find which module covers a task before loading its doc.
基于 SOC 职业分类
正在显示 SKILL.md
| name | unity-architecture |
| description | Advise on Unity gameplay and system architecture |
Before calling any skill in this module: if you are about to call a skill with parameters guessed from its name or description, STOP — read this file (or fetch its schema via
GET /skills/recommend?includeSchema=true) first. If you already have the parameter definitions from recommend/schema, you may proceed straight to dryRun.
Use this before generating lots of gameplay scripts or when the user asks for a cleaner architecture.
When using this skill, structure the advice as:
MonoBehaviour scripts as composition bridges.ScriptableObject for authored config and shared static data, not as a default dump for runtime state.Most "random" gameplay bugs trace back to two silent assumptions: that scripts run in a predictable order, and that Update runs only when its data is ready. Neither is true unless you make them so.
Do not rely on Script Execution Order panels or accidental Awake ordering. Prefer these patterns in order of preference:
sub.Init() on the managers it creates. Only this one script has [DefaultExecutionOrder(-10000)].source.GetValue() on demand or subscribes to an event. A publisher that pushes into others during its own Awake creates hidden order dependencies.[DefaultExecutionOrder(n)] for load-bearing singletons only (Bootstrap, InputRouter, SceneController). If more than 3-4 scripts need it, the architecture is wrong, not the ordering.The analogous ECS pattern — [UpdateBefore(typeof(BarSystem))] / [UpdateAfter] — works because the framework validates contradictions at sort time. In MonoBehaviour code the compiler won't catch them; be conservative. Source: EntitiesSamples/Docs/systems.md:32 — "if the ordering attributes of a group's children create a contradiction, an exception is thrown".
Every Update / LateUpdate / FixedUpdate should open with guard clauses that early-return when the system is not ready. Prefer the cheapest check first:
void Update() {
if (!_isInitialized) return; // construction-time
if (_dataSource == null) return; // dependency-level
if (_paused) return; // gameplay-state
// real work here
}
A missing guard is the difference between "doesn't run yet" (safe) and "runs with stale/null data and silently corrupts state" (debug nightmare). The ECS equivalent is state.RequireForUpdate<Config>() in OnCreate, which turns the precondition into a system-level invariant. Source: Dots101/Entities101/Assets/HelloCube/3. Prefabs/SpawnSystem.cs:17-19 — the system does not update unless a Spawner entity exists.
Mode: Documentation only — no REST skills to gate; load freely under any operating mode (Approval / Auto / Bypass).
../patterns/SKILL.md../async/SKILL.md../inspector/SKILL.md../scriptdesign/SKILL.md