new-unity-project
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNew Unity Project
新建Unity项目
A guided flow from an idea to a running, version-controlled Unity project. This skill owns the
flow — the questions, their ordering, running slow installs in the background while you ask,
and the handoffs. It deliberately does not re-document commands; it delegates the mechanics
to other skills.
Delegates to (read these for the actual commands — don't reinvent them):
- — CLI install, auth/license, Editor install, project creation, source control, opening the project. Its "Bootstrap a new project from scratch" workflow is the backbone here.
unity-cli - — installing packages via the C# PackageManager Client API, and choosing packages by genre / platform / monetization.
unity-package-management - ,
implement-in-app-purchases,levelplay-unity-integration— monetization / backend integration (invoked at the end).build-live-game
Work one step at a time. Ask only the current step's questions and wait for the user before
moving on — platform and monetization answers change what you install, so don't gather everything
up front or scaffold before they're settled.
这是一个从想法到可运行且已配置版本控制的Unity项目的引导式流程。本技能负责流程管控——包括提问、问题排序、在提问时后台运行耗时的安装操作,以及任务交接。它刻意不重复记录命令,而是将具体操作委托给其他技能。
委托给以下技能(如需了解实际命令请查阅这些技能,不要重复造轮子):
- ——CLI安装、授权/许可证、Editor安装、项目创建、版本控制、打开项目。其“从零开始搭建新项目基础架构”的工作流是本流程的核心。
unity-cli - ——通过C# PackageManager Client API安装包,以及根据游戏类型/平台/变现方式选择合适的包。
unity-package-management - 、
implement-in-app-purchases、levelplay-unity-integration——变现/后端集成(在流程末尾调用)。build-live-game
逐步推进工作。每次只询问当前步骤的问题,等待用户回答后再进入下一步——平台和变现方式的选择会影响安装内容,因此不要提前收集所有信息,也不要在用户确认前进行搭建。
The flow — and where the parallelism is
流程及并行操作时机
- Concept — what they're building.
- Platforms & monetization — then, as soon as platforms are known, kick off the Editor install in the background (it takes minutes) and keep talking.
- (joins) Editor + platform modules finish installing.
- Project + source control — create from a matching template; init git.
- Packages — install via the C# Client API.
- Save & first commit.
- Hand off monetization / backend.
The whole point of a guided flow over a raw recipe: the multi-minute Editor install overlaps the
minutes the user spends answering concept questions, so setup feels instant.
- 项目概念——用户要开发的内容。
- 平台与变现方式——一旦确定目标平台,立即后台启动Editor安装(该过程需数分钟),同时继续与用户交流。
- **(同步)**Editor及平台模块安装完成。
- 项目与版本控制——从匹配的模板创建项目;初始化git。
- 安装包——通过C# Client API安装。
- 保存并提交首次版本。
- 交接——将变现/后端工作移交出去。
与直接提供操作指南相比,引导式流程的核心优势在于:耗时数分钟的Editor安装可以与用户回答项目概念问题的时间重叠,让项目初始化看起来几乎是即时完成的。
Step 1 — Concept
步骤1:项目概念
Use so the user can pick fast, but let them answer freely too. Cover:
AskUserQuestion- Genre / core loop — platformer, top-down shooter, puzzle, idle, RPG, racing, card, tower defense, sim, hyper-casual, first-person, etc.
- Dimension & look — 2D or 3D; art style (pixel, low-poly, stylized, realistic, UI-only).
- Gameplay — the one-sentence "what the player does moment to moment."
- Scope — single-screen prototype vs. multi-scene game; single-player or multiplayer.
Also settle on a project name. Write a 2–4 line project brief, read it back to confirm.
The brief drives template choice (Step 4) and packages (Step 5).
使用让用户快速选择,同时允许自由回答。需涵盖:
AskUserQuestion- 游戏类型/核心循环——平台跳跃、俯视角射击、解谜、放置、RPG、竞速、卡牌、塔防、模拟、超休闲、第一人称等。
- 维度与视觉风格——2D或3D;美术风格(像素风、低多边形、卡通风格、写实风格、仅UI)。
- 游戏玩法——用一句话描述玩家每时每刻的操作内容。
- 项目规模——单屏原型还是多场景游戏;单人还是多人。
同时确定项目名称。撰写2-4行的项目简介,并向用户确认。该简介将用于步骤4的模板选择和步骤5的包安装。
Step 2 — Platforms & monetization, then start installing
步骤2:平台与变现方式,随后启动安装
Two decisions, because both change what you install:
- Target platforms (multi-select): Desktop (Win/macOS/Linux), Mobile (iOS/Android), WebGL, Console. These map to Editor modules (Step 3) and argue for leaner packages on mobile/WebGL.
- Monetization: none / premium / in-app purchases / ads / mix. This only decides which handoff skill you invoke in Step 7 — don't integrate it now.
Confirm the Editor version to use (default: latest LTS — see for the LTS vs. Tech
vs. beta trade-off). Ask this now, before kicking off the install, so you don't install the
wrong one.
unity-cliThen confirm prerequisites and launch the Editor install as a background task so it runs while
you continue. See the skill for exact syntax, module names per platform, and auth /
license setup:
unity-clibash
unity --version
unity auth status --format json # if signed out: unity auth login
unity license status --format json # if none active: unity license activate两个关键决策,因为它们会影响安装内容:
- 目标平台(可多选):桌面端(Win/macOS/Linux)、移动端(iOS/Android)、WebGL、主机平台。这些对应Editor的模块(步骤3),且移动端/WebGL平台会倾向于选择更轻量化的包。
- 变现方式:无/付费/内购/广告/混合模式。这仅决定步骤7中调用哪个交接技能——不要在此阶段进行集成。
确认要使用的Editor版本(默认:最新LTS版本——关于LTS、Tech版和测试版的区别请查阅)。在启动安装前询问此问题,避免安装错误版本。
unity-cli然后确认前置条件,将Editor安装作为后台任务启动,以便在继续交流的同时进行安装。具体语法、各平台对应的模块名称以及授权/许可证设置请查阅技能:
unity-clibash
unity --version
unity auth status --format json # 若未登录:unity auth login
unity license status --format json # 若无有效许可证:unity license activateStart in the BACKGROUND, then go straight back to the conversation. Module names per platform
在后台启动安装,然后立即回到对话。各平台对应的模块名称(android / ios / webgl / …)可在unity-cli技能中找到。
(android / ios / webgl / …) are in the unity-cli skill.
—
unity install lts --module <platform-modules> --yes --accept-eula
Run that install as a **background task** (don't block on it). If you have nothing left to ask,
it's fine to just wait — the parallelism only helps when there's a conversation to overlap.unity install lts --module <platform-modules> --yes --accept-eula
将该安装作为**后台任务**运行(不要阻塞对话)。如果没有剩余问题需要询问,等待即可——并行操作仅在有对话可重叠时发挥作用。Step 3 — Join: Editor ready
步骤3:同步:Editor准备就绪
Before creating the project, confirm the background install finished:
bash
unity editors --installed --format jsonIf it failed, surface the error (see troubleshooting) and stop — nothing downstream
works without an Editor.
unity-cli在创建项目前,确认后台安装已完成:
bash
unity editors --installed --format json如果安装失败,显示错误信息(请查阅的故障排除内容)并停止流程——没有Editor,后续所有操作都无法进行。
unity-cliStep 4 — Create the project + source control
步骤4:创建项目并配置版本控制
Follow the "Bootstrap a new project from scratch" workflow verbatim:
unity-cli- List the real template ids the Editor offers () and pick one matching 2D/3D and render pipeline from the brief — don't guess ids.
unity templates list - Create with .
unity projects create "<Name>" --path <dir> --editor-version <v> --template <id> - Set up source control — ask the user which they want, don't assume: Git (GitHub / GitLab;
add for asset-heavy games) or Unity Version Control (
--git-lfs, which handles large binary assets natively — no LFS), or a purely local--vcs uvcs+ Unitygit init. Publish in one step with.gitignore(tokens on stdin). Passunity projects create --vcs … --git-token-stdin --no-initial-commitso the CLI doesn't commit the bare project before packages and--no-initial-commitfiles exist — you make the real first commit/check-in in Step 6. See the.metaworkflow for exact flags.unity-cli
严格遵循****的“从零开始搭建新项目基础架构”工作流:
unity-cli- 列出Editor提供的真实模板ID(),选择与项目简介中的2D/3D和渲染管线匹配的模板——不要猜测ID。
unity templates list - 使用创建项目。
unity projects create "<Name>" --path <dir> --editor-version <v> --template <id> - 配置版本控制——询问用户偏好,不要自行假设:Git(GitHub / GitLab;对于资产较多的游戏添加)或Unity Version Control(
--git-lfs,原生支持大型二进制资产——无需LFS),或纯本地的--vcs uvcs+ Unitygit init。 使用.gitignore一步完成发布(令牌通过标准输入传递)。添加**unity projects create --vcs … --git-token-stdin --no-initial-commit**参数,避免CLI在包和--no-initial-commit文件生成前提交空项目——步骤6中再进行首次提交/检入。具体参数请查阅.meta工作流。unity-cli
Step 5 — Packages
步骤5:安装包
Map the brief to a concrete package list and install it via the
skill (C# PackageManager Client API — never hand-edit ). Read that skill for
the genre/platform/monetization → package mapping, the installer script, and the gotcha.
Read the final list back to the user before installing; verify afterward.
unity-package-managementmanifest.json-quitmanifest.json将项目简介映射为具体的包列表,并通过****技能安装(使用C# PackageManager Client API——绝对不要手动编辑)。游戏类型/平台/变现方式到包的映射、安装脚本以及注意事项请查阅该技能。安装前向用户确认最终的包列表;安装后验证。
unity-package-managementmanifest.json-quitmanifest.jsonStep 6 — Save & first commit
步骤6:保存并提交首次版本
Open the project once so Unity imports the assets and generates every file, then make
the first commit with whichever VCS you set up in Step 4:
.metabash
unity open "<project-path>" # imports + generates .meta; for headless/CI use the
# "Import & save headlessly" method in unity-package-management- Git (GitHub / GitLab / local):
Everybash
cd "<project-path>" git add -A git status # Library/ Temp/ obj/ Build/ must NOT be staged git commit -m "Initial Unity project: <Name>"/asset must be committed together with its.cs..meta - Unity Version Control (UVCS): check in through your UVCS client/workspace (created during
Step 4) — there's no step. Generated folders are still excluded by the ignore rules.
git
If you published via in Step 4 without , the CLI already made an
initial commit of the bare project — add a follow-up commit here rather than double-committing.
--vcs--no-initial-commit打开项目一次,让Unity导入资产并生成所有文件,然后使用步骤4中配置的版本控制系统进行首次提交:
.metabash
unity open "<project-path>" # 导入资产并生成.meta;在无头/CI环境中使用unity-package-management中的“无头模式下导入并保存”方法- Git(GitHub / GitLab / 本地):
每个bash
cd "<project-path>" git add -A git status # Library/ Temp/ obj/ Build/ 绝对不能被暂存 git commit -m "Initial Unity project: <Name>"文件/资产必须与其对应的.cs文件一起提交。.meta - **Unity Version Control (UVCS):**通过UVCS客户端/工作区(步骤4中创建)进行检入——无需执行步骤。生成的文件夹仍会被忽略规则排除。
git
如果在步骤4中使用参数发布时未添加,CLI已提交了空项目的初始版本——在此处添加后续提交即可,不要重复提交。
--vcs--no-initial-commitStep 7 — Hand off
步骤7:任务交接
Based on Step 2 monetization, invoke the matching skill for the actual integration:
- IAP → implement-in-app-purchases
- Ads → levelplay-unity-integration
- Accounts / cloud save / economy / remote config / leaderboards → build-live-game
Report the project path, Editor version, installed packages, and next steps.
根据步骤2中选择的变现方式,调用对应的技能进行实际集成:
- 内购 → implement-in-app-purchases
- 广告 → levelplay-unity-integration
- 账号/云存档/经济系统/远程配置/排行榜 → build-live-game
向用户报告项目路径、Editor版本、已安装的包以及下一步操作。
Scope — what this skill does NOT do
范围:本技能不负责的内容
- No gameplay scaffolding. It gets you to a running, empty-but-wired project; building the
actual game (scenes, controllers, art) is the next conversation — iterate there with the Editor
via the MCP server and the Package Manager. Generic genre skeletons tend to produce throwaway mocked primitives, so this skill intentionally stops at a clean starting point.
unity-cli - No command reference. Syntax lives in /
unity-cli.unity-package-management
- 不搭建游戏玩法。本技能仅帮助你创建一个可运行、已配置好但无内容的项目;实际开发游戏(场景、控制器、美术)是下一个环节——可通过MCP服务器和Package Manager在Editor中迭代开发。通用的游戏类型框架往往会生成一次性的模拟原型,因此本技能特意在干净的起点处停止。
unity-cli - 不提供命令参考。命令语法请查阅/
unity-cli。unity-package-management
Checklist
检查清单
- Concept brief captured and confirmed (genre, look, gameplay, scope, name)
- Platforms + monetization recorded; Editor version chosen
- Editor + platform modules installed (started in the background during Step 2)
- Project created from a matching template; git initialized with a Unity
.gitignore - Packages installed via the C# Client API; verified
manifest.json - Project opened/saved so files exist; first commit made;
.metaexcludedLibrary/ - Handed off to the monetization/backend skill if applicable
- 已捕获并确认项目简介(游戏类型、视觉风格、玩法、规模、名称)
- 已记录平台+变现方式;已选择Editor版本
- Editor及平台模块已安装(步骤2中后台启动)
- 已从匹配模板创建项目;已初始化git并配置Unity
.gitignore - 已通过C# Client API安装包;已验证
manifest.json - 已打开/保存项目以生成文件;已完成首次提交;已排除
.metaLibrary/ - 若适用,已将任务移交至变现/后端技能
Common mistakes
常见错误
- Blocking on the Editor install instead of backgrounding it while you ask questions.
- Installing the wrong Editor because the version wasn't confirmed before the background install.
- Gathering all questions up front — platform/monetization answers change the modules and packages.
- Hand-editing instead of using the Client API (see
manifest.json).unity-package-management - Committing /
Library//Temp//obj/, or scripts without theirBuild/files..meta - Missing Editor modules — a mobile target needs /
android; WebGL needsios.webgl
- 等待Editor安装完成而非在提问时后台运行安装。
- 安装错误的Editor版本,因为在后台安装前未确认版本。
- 提前收集所有问题——平台/变现方式的选择会影响模块和包的安装。
- **手动编辑**而非使用Client API(请查阅
manifest.json)。unity-package-management - 提交/
Library//Temp//obj/,或未提交脚本对应的Build/文件。.meta - 缺少Editor模块——移动端目标需要/
android模块;WebGL需要ios模块。webgl