unity-rapid-prototyping
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWhen to Use
使用场景
- Planning or implementing any feature, mechanic, or system in a Unity game (jam or prototype)
- An agent is about to write C# or build scenes via the Unity MCP
- Deciding between building something vs. using an existing asset, package, or placeholder
- Reviewing scope when time is limited and the game must ship
- 在Unity游戏(game jam或原型)中规划或实现任何功能、机制或系统时
- 即将通过Unity MCP编写C#代码或构建场景时
- 纠结是自行开发还是使用现有资源、包或占位符时
- 时间有限且必须完成游戏时的范围评审
Prerequisites — validate the environment BEFORE anything
前置条件——先验证环境
The skill only works when the agent can reach Unity through the MCP bridge. Run this checklist once per session and report the result:
| Check | How to validate | Required |
|---|---|---|
| Unity Editor connected via MCP | | ✅ |
| | ✅ |
| | ✅ |
| | ✅ for EditMode tests |
If any required package is missing, STOP and tell the user how to install it — do NOT start building. Do not guess package names: read the actual package list.
只有当Agent能通过MCP桥接访问Unity时,本技能才能生效。每次会话运行一次以下检查清单并报告结果:
| 检查项 | 验证方式 | 是否必需 |
|---|---|---|
| Unity Editor通过MCP连接 | | ✅ |
| | ✅ |
| | ✅ |
| | ✅(仅EditMode测试需要) |
如果任何必需包缺失,请停止操作并告知用户安装方法——不要开始构建。不要猜测包名称:请查看实际包列表。
Install commands (when missing)
安装命令(当包缺失时)
bash
undefinedbash
undefinedunity-mcp (CoplayDev) — Package Manager → Add from git URL
unity-mcp (CoplayDev) — 包管理器 → 从Git URL添加
manage_packages(action="add_package", package="https://github.com/CoplayDev/unity-mcp.git?path=/MCPForUnity#main")
manage_packages(action="add_package", package="https://github.com/CoplayDev/unity-mcp.git?path=/MCPForUnity#main")
Unity AI Assistant (Agentes.IA) — requires Unity 6.0+, project linked to Unity Cloud
Unity AI Assistant (Agentes.IA) — 需要Unity 6.0+,项目已关联Unity Cloud
manage_packages(action="add_package", package="com.unity.ai.assistant")
manage_packages(action="add_package", package="com.unity.ai.assistant")
Test Framework (for EditMode/PlayMode validation)
Test Framework(用于EditMode/PlayMode验证)
manage_packages(action="add_package", package="com.unity.test-framework")
undefinedmanage_packages(action="add_package", package="com.unity.test-framework")
undefinedIdea Validator — from theme to ONE playable concept
想法验证器——从主题到可玩概念
The jam starts with a theme, not a game. Go from theme → ONE direction whose core loop is buildable in the jam time. This is a KILLER of ideas, not a cheerleader: it says NO to ~90% of ideas.
Game jam从主题开始,而非游戏。从主题出发,确定一个能在jam时间内完成核心循环的方向。这是想法的“筛选器”,而非“啦啦队”:会否决约90%的想法。
Collect preferences first — ask, don't assume
先收集偏好——询问而非假设
The theme shapes the idea, but the human shapes the choices. ASK the user's preferences BEFORE generating directions — do NOT invent their skills. Keep it to 5 questions max, ask one at a time:
| # | Question | Why it matters |
|---|---|---|
| 1 | What genre are you strongest at / enjoy most? (e.g. shooter, platformer, puzzle) | Strongest genre = highest odds of finishing well |
| 2 | How much jam time do you have? (hours) | Sets the scope ceiling for "Finish in jam time" |
| 3 | Solo or team? Team size? | More hands = more scope allowed |
| 4 | Unity + C# comfort level? (beginner / comfortable / strong) | Beginner → simpler architecture + more placeholders |
| 5 | Any must-haves or must-avoids? (e.g. no 3D, love roguelikes, want local multiplayer) | Hard constraints that can kill an idea instantly |
Rules:
- Preferences are a FILTER, not the whole game: genre narrows the field, theme shapes the idea. A shooter preference + theme "growth" → a shooter about growing, not just a shooter.
- If the user does not answer, use sensible defaults (top-down action, 48h, solo, comfortable) and STATE the assumption.
- When generating directions, honor hard preferences (genre, must-avoids) in EVERY pitch; use soft ones (time, team, skill) to tune scope.
主题塑造想法,但用户的选择决定方向。在生成方向前先询问用户偏好——不要臆测他们的技能。最多问5个问题,一次问一个:
| 序号 | 问题 | 重要性 |
|---|---|---|
| 1 | 你最擅长/最喜欢的游戏类型是什么?(例如:射击、平台、解谜) | 擅长的类型=更高的完成质量概率 |
| 2 | 你有多少jam时间?(小时) | 设定“在jam时间内完成”的范围上限 |
| 3 | 单人还是团队?团队规模? | 人手越多=允许的范围越大 |
| 4 | Unity + C#的熟练程度?(新手/熟练/精通) | 新手→更简单的架构+更多占位符 |
| 5 | 有没有必须包含或必须避免的内容?(例如:不做3D、喜欢肉鸽、想要本地多人) | 硬性约束可直接否决想法 |
规则:
- 偏好是筛选器,而非全部:类型缩小范围,主题塑造想法。比如偏好射击+主题“成长”→一款关于成长的射击游戏,而非单纯的射击游戏。
- 如果用户未回答,使用合理默认值(俯视角动作、48小时、单人、熟练)并说明假设。
- 生成方向时,每个提案都要遵守硬性偏好(类型、必须避免的内容);使用软性偏好(时间、团队、技能)调整范围。
Generate 3–5 directions
生成3-5个方向
Give every direction a one-sentence pitch: genre + the exact 10-second action the player does + how it interprets the theme.
| Direction | One-sentence pitch | Theme take (literal / metaphor) |
|---|---|---|
| A | ... | ... |
| B | ... | ... |
| C | ... | ... |
每个方向用一句话概括:类型+玩家10秒内的具体动作+主题诠释方式。
| 方向 | 一句话概括 | 主题解读(字面/隐喻) |
|---|---|---|
| A | ... | ... |
| B | ... | ... |
| C | ... | ... |
Validate each direction
验证每个方向
| Criterion | Question | Fail → |
|---|---|---|
| Core loop | Can you state what the player does every 10 seconds in ONE sentence? | Not ready — rephrase or cut. |
| Prototype in <1h | Can the core loop be grey-boxed in 1 hour? | Too many systems — simplify or cut. |
| Fun-risk | Is the fun testable in play mode immediately (1 object, 1 target)? | Defer — needs 5 systems to feel anything. |
| Finish in jam time | Can it be FINISHED (not just started) in the jam hours? | Cut or shrink scope. |
| Standout | What makes it memorable vs 100 entries with the same theme? | No answer — it's the crowd idea, rethink. |
| Theme tie | Can you defend the theme connection in one sentence? | Literal ties are safe but crowded; metaphor is riskier but more memorable. |
| 标准 | 问题 | 不通过→ |
|---|---|---|
| 核心循环 | 你能用一句话说明玩家每10秒做什么吗? | 未准备好——重新表述或删减。 |
| 1小时内原型化 | 核心循环能在1小时内完成灰盒制作吗? | 系统过多——简化或删减。 |
| 趣味风险 | 玩法趣味能立即在PlayMode中测试吗?(1个对象、1个目标) | 延后——需要5个系统才能感受到趣味。 |
| 在jam时间内完成 | 能在jam时间内完成(而非仅启动)吗? | 删减或缩小范围。 |
| 独特性 | 与同主题的100个作品相比,它的记忆点是什么? | 无答案——属于大众想法,重新构思。 |
| 主题关联 | 你能用一句话捍卫与主题的关联吗? | 字面关联安全但同质化;隐喻关联风险更高但更具记忆点。 |
Verdicts
结论
- BUILD NOW — passes everything: start the mini-prototype in the first hour.
- VALIDATE FIRST — fun is uncertain: build only the core loop grey-box; fun in that hour decides if it stays.
- CUT — fails core loop, scope, or standout: record it, move to the next direction.
- 立即构建——通过所有验证:在第一个小时开始制作迷你原型。
- 先验证——趣味不确定:仅构建核心循环灰盒;一小时内的趣味测试决定是否保留。
- 否决——未通过核心循环、范围或独特性测试:记录下来,转向下一个方向。
Rules
规则
- The first hour of the jam is a MINI-PROTOTYPE of the chosen idea. If it is not fun after that hour, switch to the #2 direction. Do NOT polish it.
- Do not fall in love with an idea. The validator says NO until an idea survives every criterion.
- Division of labor: the AI proposes directions and enforces constraints (quantity + discipline); the human owns taste and the final pick. The AI is the strict mentor, NOT the creative brain.
- Jam的第一个小时是所选想法的迷你原型。如果一小时后仍无趣味,切换到第2个方向。不要打磨。
- 不要沉迷于某个想法。验证器会否决所有想法,直到有一个通过所有标准。
- 分工:AI提出方向并执行约束(数量+纪律);用户负责审美和最终选择。AI是严格的导师,而非创意大脑。
Critical Patterns
关键模式
1. The Decision Gate — run it BEFORE proposing any code
1. 决策闸门——在提议任何代码前运行
For EVERY feature request, answer these five questions internally, in order, and show the verdict when you propose:
| # | Question | Pass | Fail → do this |
|---|---|---|---|
| 1 | Does it serve the CORE LOOP? | It directly supports the primary gameplay loop | Don't build now. Write it down, move on. |
| 2 | Can it be done in <1 hour? | Small, single-mechanic scope | Split it, cut it, or timebox it. |
| 3 | Is there a 10x simpler version? | The simplest possible version is identified | Keep simplifying until the 10x version is obvious. |
| 4 | Asset over custom? | An existing asset/placeholder is good enough | Use the asset. Do NOT hand-roll. |
| 5 | Does it raise the odds of FINISHING? | The game gets closer to playable | Cut it. Finishing beats polish. |
A feature that fails the gate is not wrong — it is NOT NOW. Record it and protect the core loop.
对于每个功能请求,按顺序内部回答以下5个问题,并在提议时给出结论:
| 序号 | 问题 | 通过标准 | 不通过→执行操作 |
|---|---|---|---|
| 1 | 它服务于核心循环吗? | 直接支持主要游戏循环 | 现在不构建。记录下来,继续下一步。 |
| 2 | 能在1小时内完成吗? | 范围小,单一机制 | 拆分、删减或设定时间盒。 |
| 3 | 有没有10倍简化的版本? | 已确定最简单的版本 | 持续简化直到10倍版本明确。 |
| 4 | 优先使用资源而非自定义? | 现有资源/占位符足够用 | 使用资源。不要自行开发。 |
| 5 | 它能提高完成概率吗? | 游戏更接近可玩状态 | 删减。完成度优于打磨。 |
| 未通过闸门的功能并非错误——只是“现在不做”。记录下来并保护核心循环。 |
2. Gameplay-first mandate
2. 玩法优先要求
- Validate the fun BEFORE the architecture. A grey-boxed mechanic in play mode beats a clean-but-unplayable system.
- Minimal architecture: no DI containers, no event buses, no "extensible systems" in a jam. One scene, plain MonoBehaviours, direct references.
- Placeholders are features: cubes, capsules, and white sprites are acceptable stand-ins for art until the loop is fun.
- 在架构前验证趣味。PlayMode中的灰盒机制优于干净但不可玩的系统。
- 极简架构:jam中不使用DI容器、事件总线或“可扩展系统”。单个场景、普通MonoBehaviours、直接引用。
- 占位符就是功能:立方体、胶囊体和白色精灵在循环有趣前可作为美术的替代。
3. Kill-or-simplify timebox
3. 否决或简化时间盒
- If a mechanic is not fun after one focused iteration, kill it or simplify it. Do NOT polish a bad idea.
- Prefer deleting code over refactoring it when the feature is not core.
- 如果一个机制经过一次专注迭代后仍无趣味,否决或简化它。不要打磨糟糕的想法。
- 当功能非核心时,优先删除代码而非重构。
Unity MCP Workflow
Unity MCP工作流
- Idea validated first: ask the user's preferences (genre, time, team, skill, must-haves) → run the Idea Validator with theme + preferences → ONE direction with a core loop stated in one sentence. Do NOT open the editor before this exists.
- Validate prerequisites first (see Prerequisites section): editor connected via MCP + required packages installed. Then check for compile errors — never build on a broken compile.
read_console - Create or modify scripts, then immediately to catch compilation errors before proceeding.
read_console - Validate visual/gameplay changes with play mode (play/pause/stop) + screenshots; validate logic with
manage_editor(EditMode/PlayMode).run_tests - Build the scene with the minimum GameObjects needed: camera, light, one playable object, one interactable target.
- Iterate: change → compile check → play → confirm fun → commit.
- 先验证想法:询问用户偏好(类型、时间、团队、技能、必须包含的内容)→结合主题和偏好运行想法验证器→确定一个能用一句话说明核心循环的方向。在此之前不要打开编辑器。
- 先验证前置条件(见前置条件部分):编辑器通过MCP连接+必需包已安装。然后检查是否有编译错误——永远不要在编译错误的基础上构建。
read_console - 创建或修改脚本,然后立即以在继续前捕获编译错误。
read_console - 通过PlayMode(的播放/暂停/停止)+截图验证视觉/玩法变化;通过
manage_editor(EditMode/PlayMode)验证逻辑。run_tests - 使用最少的GameObject构建场景:相机、灯光、一个可玩对象、一个可交互目标。
- 迭代:修改→编译检查→播放→确认趣味→提交。
Code Examples
代码示例
Minimal before polished — the whole game loop in a handful of MonoBehaviours:
csharp
// Placeholder player controller — enough to validate the core loop
public class Player : MonoBehaviour
{
public float speed = 5f;
void Update()
{
var h = Input.GetAxis("Horizontal");
var v = Input.GetAxis("Vertical");
transform.position += new Vector3(h, 0, v) * speed * Time.deltaTime;
}
}Pure logic, easily testable in EditMode — keep game rules outside MonoBehaviours so they can be validated fast:
csharp
public class Health
{
public int Current { get; private set; }
public Health(int start) => Current = start;
public void TakeDamage(int amount) => Current = Mathf.Max(0, Current - amount);
}csharp
// Assets/Tests/EditMode/HealthTests.cs
public class HealthTests
{
[Test]
public void Health_NeverGoesBelowZero()
{
var h = new Health(5);
h.TakeDamage(99);
Assert.AreEqual(0, h.Current);
}
}极简优先于精致——少量MonoBehaviours实现完整游戏循环:
csharp
// 占位符玩家控制器——足以验证核心循环
public class Player : MonoBehaviour
{
public float speed = 5f;
void Update()
{
var h = Input.GetAxis("Horizontal");
var v = Input.GetAxis("Vertical");
transform.position += new Vector3(h, 0, v) * speed * Time.deltaTime;
}
}纯逻辑,易于在EditMode中测试——将游戏规则放在MonoBehaviours之外以便快速验证:
csharp
public class Health
{
public int Current { get; private set; }
public Health(int start) => Current = start;
public void TakeDamage(int amount) => Current = Mathf.Max(0, Current - amount);
}csharp
// Assets/Tests/EditMode/HealthTests.cs
public class HealthTests
{
[Test]
public void Health_NeverGoesBelowZero()
{
var h = new Health(5);
h.TakeDamage(99);
Assert.AreEqual(0, h.Current);
}
}Commands
命令
bash
undefinedbash
undefinedUnity MCP: validate environment first
Unity MCP:先验证环境
manage_packages(action="list_packages") # required: com.coplaydev.unity-mcp, com.unity.ai.assistant, com.unity.test-framework
manage_packages(action="list_packages") # 必需:com.coplaydev.unity-mcp, com.unity.ai.assistant, com.unity.test-framework
Unity MCP: validate logic fast
Unity MCP:快速验证逻辑
run_tests(mode="EditMode") # then poll get_test_job
run_tests(mode="EditMode") # 然后轮询get_test_job
Unity MCP: validate feel
Unity MCP:验证手感
manage_editor(action="play") # play mode
read_console(types=["error"]) # compile + runtime errors
undefinedmanage_editor(action="play") # 播放模式
read_console(types=["error"]) # 编译+运行时错误
undefinedResources
资源
- Unity MCP tools: full tool list in the session (unityMCP server).
- Decision Gate: keep the 5-question table in front of every proposal.
- Unity MCP工具:会话中的完整工具列表(unityMCP服务器)。
- 决策闸门:在每个提案前参考5问题表格。