nccgs 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/nccgs-accessibility-specialist.md +26 -0
- package/.claude/agents/nccgs-adversarial-reviewer.md +26 -0
- package/.claude/agents/nccgs-ai-programmer.md +26 -0
- package/.claude/agents/nccgs-analytics-engineer.md +26 -0
- package/.claude/agents/nccgs-art-direction-lead.md +26 -0
- package/.claude/agents/nccgs-audio-direction-lead.md +26 -0
- package/.claude/agents/nccgs-creative-director.md +26 -0
- package/.claude/agents/nccgs-documentation-manager.md +26 -0
- package/.claude/agents/nccgs-economy-designer.md +26 -0
- package/.claude/agents/nccgs-engine-programmer.md +26 -0
- package/.claude/agents/nccgs-game-design-lead.md +26 -0
- package/.claude/agents/nccgs-game-designer.md +26 -0
- package/.claude/agents/nccgs-gameplay-programmer.md +26 -0
- package/.claude/agents/nccgs-level-designer.md +26 -0
- package/.claude/agents/nccgs-live-ops-designer.md +26 -0
- package/.claude/agents/nccgs-localization-lead.md +26 -0
- package/.claude/agents/nccgs-narrative-lead.md +26 -0
- package/.claude/agents/nccgs-network-programmer.md +26 -0
- package/.claude/agents/nccgs-performance-analyst.md +26 -0
- package/.claude/agents/nccgs-producer.md +26 -0
- package/.claude/agents/nccgs-production-coordinator.md +23 -0
- package/.claude/agents/nccgs-programming-lead.md +26 -0
- package/.claude/agents/nccgs-prototyper.md +26 -0
- package/.claude/agents/nccgs-qa-engineer.md +26 -0
- package/.claude/agents/nccgs-qa-lead.md +26 -0
- package/.claude/agents/nccgs-release-engineer.md +26 -0
- package/.claude/agents/nccgs-release-lead.md +26 -0
- package/.claude/agents/nccgs-security-engineer.md +26 -0
- package/.claude/agents/nccgs-sound-designer.md +26 -0
- package/.claude/agents/nccgs-systems-designer.md +26 -0
- package/.claude/agents/nccgs-technical-architect.md +26 -0
- package/.claude/agents/nccgs-technical-artist.md +26 -0
- package/.claude/agents/nccgs-technical-director.md +26 -0
- package/.claude/agents/nccgs-tools-programmer.md +26 -0
- package/.claude/agents/nccgs-ui-programmer.md +26 -0
- package/.claude/agents/nccgs-unity-build-specialist.md +26 -0
- package/.claude/agents/nccgs-unity-content-specialist.md +26 -0
- package/.claude/agents/nccgs-unity-implementer.md +26 -0
- package/.claude/agents/nccgs-unity-rendering-specialist.md +26 -0
- package/.claude/agents/nccgs-unity-systems-specialist.md +26 -0
- package/.claude/agents/nccgs-unity-ui-specialist.md +26 -0
- package/.claude/agents/nccgs-ux-designer.md +26 -0
- package/.claude/agents/nccgs-verification-engineer.md +26 -0
- package/.claude/agents/nccgs-world-builder.md +26 -0
- package/.claude/agents/nccgs-writer.md +26 -0
- package/.claude/nccgs/THIRD_PARTY_NOTICES.md +13 -0
- package/.claude/nccgs/VERSION +1 -0
- package/.claude/nccgs/constitution.md +131 -0
- package/.claude/nccgs/hooks/agent-audit.mjs +10 -0
- package/.claude/nccgs/hooks/common.mjs +41 -0
- package/.claude/nccgs/hooks/post-compact.mjs +1 -0
- package/.claude/nccgs/hooks/pre-compact.mjs +8 -0
- package/.claude/nccgs/hooks/protect-git.mjs +22 -0
- package/.claude/nccgs/hooks/protect-write.mjs +17 -0
- package/.claude/nccgs/hooks/session-start.mjs +15 -0
- package/.claude/nccgs/hooks/session-stop.mjs +7 -0
- package/.claude/nccgs/protocols/agent-contract.md +34 -0
- package/.claude/nccgs/protocols/context-packets.md +13 -0
- package/.claude/nccgs/protocols/evidence.md +15 -0
- package/.claude/nccgs/protocols/model-routing.md +22 -0
- package/.claude/nccgs/protocols/orchestration.md +26 -0
- package/.claude/nccgs/protocols/unity-boundary.md +11 -0
- package/.claude/nccgs/settings.fragment.json +77 -0
- package/.claude/nccgs/studio.json +347 -0
- package/.claude/nccgs/tools/configure-models.mjs +39 -0
- package/.claude/nccgs/unity-skills-manifest.json +727 -0
- package/.claude/nccgs/workflow-catalog.json +317 -0
- package/.claude/rules/nccgs-canonical-docs.md +19 -0
- package/.claude/rules/nccgs-editor-tools.md +12 -0
- package/.claude/rules/nccgs-localization.md +12 -0
- package/.claude/rules/nccgs-networking.md +13 -0
- package/.claude/rules/nccgs-performance.md +14 -0
- package/.claude/rules/nccgs-rendering.md +16 -0
- package/.claude/rules/nccgs-security.md +13 -0
- package/.claude/rules/nccgs-tests.md +18 -0
- package/.claude/rules/nccgs-ui.md +14 -0
- package/.claude/rules/nccgs-unity-assets.md +21 -0
- package/.claude/rules/nccgs-unity-code.md +22 -0
- package/.claude/skills/accessibility-review/SKILL.md +14 -0
- package/.claude/skills/architecture-decision/SKILL.md +14 -0
- package/.claude/skills/asset-audit/SKILL.md +14 -0
- package/.claude/skills/audit/SKILL.md +16 -0
- package/.claude/skills/audit/references/dimensions.md +46 -0
- package/.claude/skills/balance-review/SKILL.md +14 -0
- package/.claude/skills/bug-triage/SKILL.md +14 -0
- package/.claude/skills/build-live-game/SKILL.md +317 -0
- package/.claude/skills/build-live-game/references/achievements.md +779 -0
- package/.claude/skills/build-live-game/references/apis.md +280 -0
- package/.claude/skills/build-live-game/references/authentication.md +437 -0
- package/.claude/skills/build-live-game/references/battlepass.md +860 -0
- package/.claude/skills/build-live-game/references/cloud-code.md +563 -0
- package/.claude/skills/build-live-game/references/cloud-save.md +474 -0
- package/.claude/skills/build-live-game/references/deployment.md +216 -0
- package/.claude/skills/build-live-game/references/player-account.md +813 -0
- package/.claude/skills/build-live-game/references/remote-config.md +96 -0
- package/.claude/skills/build-live-game/references/tooling.md +431 -0
- package/.claude/skills/closure/SKILL.md +14 -0
- package/.claude/skills/code-review/SKILL.md +14 -0
- package/.claude/skills/compatibility-review/SKILL.md +14 -0
- package/.claude/skills/context-pack/SKILL.md +14 -0
- package/.claude/skills/dependency-review/SKILL.md +14 -0
- package/.claude/skills/design/SKILL.md +20 -0
- package/.claude/skills/design-review/SKILL.md +14 -0
- package/.claude/skills/evidence-review/SKILL.md +14 -0
- package/.claude/skills/hotfix/SKILL.md +14 -0
- package/.claude/skills/implement-in-app-purchases/README.md +233 -0
- package/.claude/skills/implement-in-app-purchases/SKILL.md +158 -0
- package/.claude/skills/implement-in-app-purchases/references/api-notes.md +562 -0
- package/.claude/skills/implement-in-app-purchases/references/codeless-catalog.md +331 -0
- package/.claude/skills/implement-in-app-purchases/references/convert-adapty.md +268 -0
- package/.claude/skills/implement-in-app-purchases/references/convert-essentialkit.md +239 -0
- package/.claude/skills/implement-in-app-purchases/references/convert-revenuecat.md +275 -0
- package/.claude/skills/implement-in-app-purchases/references/convert-unipay.md +145 -0
- package/.claude/skills/implement-in-app-purchases/references/migration-v4-to-v5.md +204 -0
- package/.claude/skills/implement-in-app-purchases/references/path-add-iap-to-new-project.md +198 -0
- package/.claude/skills/implement-in-app-purchases/references/path-convert-native-google-billing.md +356 -0
- package/.claude/skills/implement-in-app-purchases/references/path-convert-native-storekit.md +446 -0
- package/.claude/skills/implement-in-app-purchases/references/path-implement-iap-d2c.md +680 -0
- package/.claude/skills/implement-in-app-purchases/references/platform-notes.md +204 -0
- package/.claude/skills/implement-in-app-purchases/references/pre-check.md +205 -0
- package/.claude/skills/incident-recovery/SKILL.md +14 -0
- package/.claude/skills/initialize-ai-navigation/SKILL.md +95 -0
- package/.claude/skills/initialize-ai-navigation/references/navigation-system.md +794 -0
- package/.claude/skills/levelplay-unity-integration/CHANGELOG.md +57 -0
- package/.claude/skills/levelplay-unity-integration/README.md +74 -0
- package/.claude/skills/levelplay-unity-integration/SKILL.md +1126 -0
- package/.claude/skills/levelplay-unity-integration/references/banner-api.md +920 -0
- package/.claude/skills/levelplay-unity-integration/references/best-practices.md +536 -0
- package/.claude/skills/levelplay-unity-integration/references/ilrd-api.md +337 -0
- package/.claude/skills/levelplay-unity-integration/references/initialization-api.md +630 -0
- package/.claude/skills/levelplay-unity-integration/references/interstitial-api.md +899 -0
- package/.claude/skills/levelplay-unity-integration/references/ios-setup.md +491 -0
- package/.claude/skills/levelplay-unity-integration/references/migration-sdk-9.md +666 -0
- package/.claude/skills/levelplay-unity-integration/references/privacy-settings.md +608 -0
- package/.claude/skills/levelplay-unity-integration/references/rewarded-api.md +902 -0
- package/.claude/skills/localization/SKILL.md +135 -0
- package/.claude/skills/localization/references/api-notes.md +76 -0
- package/.claude/skills/localization/resources/L10nBatchProcessor.cs +69 -0
- package/.claude/skills/localization/resources/LocalizedFontAsset.cs +18 -0
- package/.claude/skills/localize-game/SKILL.md +14 -0
- package/.claude/skills/migrate-project/SKILL.md +21 -0
- package/.claude/skills/migrate-project/references/procedure.md +63 -0
- package/.claude/skills/milestone-review/SKILL.md +14 -0
- package/.claude/skills/new-unity-project/SKILL.md +179 -0
- package/.claude/skills/optimize-audio/SKILL.md +199 -0
- package/.claude/skills/optimize-audio/resources/audio-import-api.md +146 -0
- package/.claude/skills/optimize-audio/resources/platform-settings.md +48 -0
- package/.claude/skills/optimize-text-mesh-pro/SKILL.md +182 -0
- package/.claude/skills/optimize-web/SKILL.md +393 -0
- package/.claude/skills/optimize-web/resources/WebOptimizer.cs +21 -0
- package/.claude/skills/optimize-web/resources/toktx-examples.sh +11 -0
- package/.claude/skills/performance-audit/SKILL.md +14 -0
- package/.claude/skills/physics-3d-collision/SKILL.md +442 -0
- package/.claude/skills/physics-3d-collision/references/troubleshooting.md +41 -0
- package/.claude/skills/physics-3d-collision/resources/CollisionDebugger.cs +33 -0
- package/.claude/skills/plan-feature/SKILL.md +14 -0
- package/.claude/skills/playtest/SKILL.md +14 -0
- package/.claude/skills/project-stage/SKILL.md +14 -0
- package/.claude/skills/prototype-feature/SKILL.md +14 -0
- package/.claude/skills/qa-plan/SKILL.md +14 -0
- package/.claude/skills/release/SKILL.md +18 -0
- package/.claude/skills/release-readiness/SKILL.md +14 -0
- package/.claude/skills/retrospective/SKILL.md +14 -0
- package/.claude/skills/review/SKILL.md +16 -0
- package/.claude/skills/security-audit/SKILL.md +14 -0
- package/.claude/skills/setup-multiplayer-services/SKILL.md +39 -0
- package/.claude/skills/setup-multiplayer-services/references/dgs-entrypoint.md +79 -0
- package/.claude/skills/setup-multiplayer-services/references/entrypoints.md +213 -0
- package/.claude/skills/setup-multiplayer-services/references/examples.md +33 -0
- package/.claude/skills/setup-multiplayer-services/references/implementation-fit.md +30 -0
- package/.claude/skills/setup-multiplayer-services/references/underlying-services.md +11 -0
- package/.claude/skills/setup-multiplayer-services/references/workflows-prerequisites.md +17 -0
- package/.claude/skills/setup-vivox-voice-chat/SKILL.md +118 -0
- package/.claude/skills/setup-vivox-voice-chat/evals/.env.example +6 -0
- package/.claude/skills/setup-vivox-voice-chat/evals/README.md +101 -0
- package/.claude/skills/setup-vivox-voice-chat/evals/promptfooconfig.yaml +32 -0
- package/.claude/skills/setup-vivox-voice-chat/evals/tests/init-and-login.yaml +76 -0
- package/.claude/skills/setup-vivox-voice-chat/evals/tests/text-chat.yaml +65 -0
- package/.claude/skills/setup-vivox-voice-chat/evals/tests/voice-channels.yaml +74 -0
- package/.claude/skills/setup-vivox-voice-chat/references/events-and-participants.md +79 -0
- package/.claude/skills/setup-vivox-voice-chat/references/init-and-login.md +92 -0
- package/.claude/skills/setup-vivox-voice-chat/references/text-chat.md +93 -0
- package/.claude/skills/setup-vivox-voice-chat/references/troubleshooting.md +47 -0
- package/.claude/skills/setup-vivox-voice-chat/references/voice-channels.md +90 -0
- package/.claude/skills/shader-graph-create-custom-node/SKILL.md +25 -0
- package/.claude/skills/shader-graph-create-custom-node/resources/all_hints.hlsl +182 -0
- package/.claude/skills/sprint-plan/SKILL.md +14 -0
- package/.claude/skills/sprite-editor/SKILL.md +66 -0
- package/.claude/skills/sprite-editor/references/api_reference.md +151 -0
- package/.claude/skills/sprite-editor/references/background.md +112 -0
- package/.claude/skills/sprite-editor/references/templates.md +72 -0
- package/.claude/skills/sprite-editor/scripts/AutomaticSliceTexture.cs +40 -0
- package/.claude/skills/sprite-editor/scripts/GenerateNewSpriteRects.cs +200 -0
- package/.claude/skills/sprite-editor/scripts/GetTextureSourceImageSize.cs +32 -0
- package/.claude/skills/sprite-editor/scripts/GetTextureToSlice.cs +55 -0
- package/.claude/skills/sprite-editor/scripts/GridSliceTexture.cs +40 -0
- package/.claude/skills/sprite-editor/scripts/IsometricSliceTexture.cs +141 -0
- package/.claude/skills/sprite-editor/scripts/README.md +134 -0
- package/.claude/skills/sprite-editor/scripts/SetPivotExample.cs +58 -0
- package/.claude/skills/sprite-editor/scripts/SpriteToPng.cs +88 -0
- package/.claude/skills/status/SKILL.md +16 -0
- package/.claude/skills/story-readiness/SKILL.md +14 -0
- package/.claude/skills/test/SKILL.md +16 -0
- package/.claude/skills/ui/SKILL.md +142 -0
- package/.claude/skills/ui-imgui/SKILL.md +186 -0
- package/.claude/skills/ui-imgui/references/gui-elements.md +156 -0
- package/.claude/skills/ui-imgui/references/templates.md +141 -0
- package/.claude/skills/ui-review/SKILL.md +14 -0
- package/.claude/skills/ui-ugui/SKILL.md +282 -0
- package/.claude/skills/ui-ugui/references/scrollview-setup.md +29 -0
- package/.claude/skills/ui-uitk/SKILL.md +235 -0
- package/.claude/skills/ui-uitk/references/common-issues.md +74 -0
- package/.claude/skills/ui-uitk/references/custom-elements.md +241 -0
- package/.claude/skills/ui-uitk/references/painter2d.md +282 -0
- package/.claude/skills/ui-uitk/references/pointermanipulator-guide.md +94 -0
- package/.claude/skills/ui-uitk/references/svg-icons.md +136 -0
- package/.claude/skills/ui-uitk/references/ui-runtime-binding.md +234 -0
- package/.claude/skills/ui-uitk/references/uss-guide.md +138 -0
- package/.claude/skills/unity-cli/CHANGELOG.md +233 -0
- package/.claude/skills/unity-cli/SECURITY.md +22 -0
- package/.claude/skills/unity-cli/SKILL.md +414 -0
- package/.claude/skills/unity-cli/references/auth-license-cloud.md +146 -0
- package/.claude/skills/unity-cli/references/build-run-test.md +349 -0
- package/.claude/skills/unity-cli/references/collaboration.md +472 -0
- package/.claude/skills/unity-cli/references/config-hub.md +103 -0
- package/.claude/skills/unity-cli/references/diagnostics-maintenance.md +326 -0
- package/.claude/skills/unity-cli/references/editors-install.md +327 -0
- package/.claude/skills/unity-cli/references/integration-advanced.md +472 -0
- package/.claude/skills/unity-cli/references/projects-templates.md +574 -0
- package/.claude/skills/unity-package-management/SKILL.md +304 -0
- package/.claude/skills/unity-package-management/references/select-packages.md +108 -0
- package/.claude/skills/urp-postprocessing/SKILL.md +188 -0
- package/.claude/skills/urp-postprocessing/references/code-templates.md +119 -0
- package/.claude/skills/urp-postprocessing/references/effect-reference.md +86 -0
- package/.claude/skills/validate-urp-render-graph-renderer-feature/SKILL.md +269 -0
- package/.claude/skills/work/SKILL.md +36 -0
- package/.claude/skills/work/references/classification.md +41 -0
- package/.claude/skills/work/references/closure.md +50 -0
- package/.claude/skills/work/references/feature-contracts.md +32 -0
- package/.claude/skills/work/references/verification.md +26 -0
- package/CLAUDE.md +6 -0
- package/LICENSE +21 -0
- package/README.md +162 -0
- package/THIRD_PARTY_NOTICES.md +23 -0
- package/UPGRADING.md +32 -0
- package/VERSION +1 -0
- package/docs/ARCHITECTURE.md +73 -0
- package/docs/HUONG-DAN-MIGRATE-VA-SU-DUNG.md +324 -0
- package/docs/MIGRATION-MATRIX.md +23 -0
- package/docs/PROJECT-POLICY.md +67 -0
- package/docs/WORKFLOWS.md +61 -0
- package/package-assets/setup-vivox-voice-chat-evals.gitignore +7 -0
- package/package.json +41 -0
- package/scaffold/.nccgs/bugs/.gitkeep +1 -0
- package/scaffold/.nccgs/closures/.gitkeep +1 -0
- package/scaffold/.nccgs/context/.gitkeep +1 -0
- package/scaffold/.nccgs/decisions/.gitkeep +1 -0
- package/scaffold/.nccgs/evidence/.gitkeep +1 -0
- package/scaffold/.nccgs/features/.gitkeep +1 -0
- package/scaffold/.nccgs/migrations/.gitkeep +1 -0
- package/scaffold/.nccgs/playtests/.gitkeep +1 -0
- package/scaffold/.nccgs/project.yaml +103 -0
- package/scaffold/.nccgs/requirements.yaml +10 -0
- package/scaffold/.nccgs/reviews/.gitkeep +1 -0
- package/scaffold/.nccgs/state.md +40 -0
- package/scaffold/.nccgs/templates/agent-handoff.md +25 -0
- package/scaffold/.nccgs/templates/architecture-decision.md +27 -0
- package/scaffold/.nccgs/templates/closure-record.md +51 -0
- package/scaffold/.nccgs/templates/context-packet.yaml +17 -0
- package/scaffold/.nccgs/templates/evidence-record.md +23 -0
- package/scaffold/.nccgs/templates/feature-contract.md +35 -0
- package/scaffold/.nccgs/templates/migration-plan.md +40 -0
- package/scaffold/.nccgs/templates/waiver.md +11 -0
- package/scripts/cli.mjs +56 -0
- package/scripts/install.mjs +267 -0
- package/scripts/sync-unity-skills.mjs +126 -0
- package/scripts/validate.mjs +205 -0
- package/tests/framework.test.mjs +121 -0
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
# Projects, releases & templates — unity-cli command reference
|
|
2
|
+
|
|
3
|
+
Part of the **`unity-cli`** skill. See that skill's `SKILL.md` for CLI install, global flags,
|
|
4
|
+
environment variables, exit codes, and common workflows. All global flags (`--format json`,
|
|
5
|
+
`--non-interactive`, `--yes`, `--proxy`, …) apply to every command below.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
### Projects — list, open, create, register, clone, link
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# List registered projects
|
|
13
|
+
unity projects list --format json
|
|
14
|
+
|
|
15
|
+
# Register an existing project
|
|
16
|
+
unity projects add /path/to/MyProject
|
|
17
|
+
|
|
18
|
+
# Remove from registry (does not delete files)
|
|
19
|
+
unity projects remove /path/to/MyProject
|
|
20
|
+
|
|
21
|
+
# Show project details
|
|
22
|
+
unity projects info /path/to/MyProject --format json
|
|
23
|
+
|
|
24
|
+
# Open a project in the editor
|
|
25
|
+
unity open /path/to/MyProject
|
|
26
|
+
|
|
27
|
+
# Open with a specific editor version
|
|
28
|
+
unity open /path/to/MyProject --editor-version 6000.0.47f1
|
|
29
|
+
|
|
30
|
+
# Pass extra Unity arguments
|
|
31
|
+
unity open /path/to/MyProject --args "-logFile output.log"
|
|
32
|
+
|
|
33
|
+
# Pass a build target (forwarded to Unity as -buildTarget / -buildTargetGroup)
|
|
34
|
+
unity open /path/to/MyProject --build-target StandaloneOSX
|
|
35
|
+
unity open /path/to/MyProject --build-target-group Standalone
|
|
36
|
+
|
|
37
|
+
# Version shorthand (equivalent to open with --editor-version)
|
|
38
|
+
unity 6000.0.47f1 /path/to/MyProject
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The project argument is matched against the Hub registry first (exact name or path opens immediately; a glob like `"My Game*"` prompts when multiple match); with no registry match it falls back to treating the argument as a filesystem path. Path matching is tolerant of casing, separator direction, and a trailing slash — resolved against real filesystem path identity — so a registered project is found even when the path is spelled differently, while two genuinely distinct case-variant folders on a case-sensitive volume stay distinct. `unity open` forwards `--args` to the Editor correctly on all platforms (including Windows).
|
|
42
|
+
|
|
43
|
+
**Signed-in Editor, no Hub required.** `unity open` starts a small background identity helper that answers the Editor's account lookup with the session `unity auth login` stored — your account, organization list (so Package Manager entitlements resolve), and the service addresses for your resolved `--cloudEnvironment` — so a Hub-less machine gets a signed-in Editor instead of an anonymous one. It steps aside whenever a real Hub is running or starting, exits on its own a few minutes after the Editor stops using it, and can be disabled with `UNITY_NO_EDITOR_IDENTITY_SERVER`. Signed out, the Editor just starts anonymous, as before.
|
|
44
|
+
|
|
45
|
+
**Reserved flags — do NOT pass these via `--args`.** `-projectPath` is managed by the command (Unity's parser is last-wins, so forwarding it would silently redirect the open to a different project), and `-useHub`/`-hubIPC` are deliberately never passed — they tell the Editor a Unity Hub manages its session, which the CLI is not. Passing any of them fails fast, before launch, with exit code 6:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Error: Forwarded argument '-useHub' conflicts with a reserved Unity flag managed by this command. Remove it from `--args`.
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
All three spellings Unity accepts are rejected (`-useHub`, `--useHub`, `-useHub=1`, case-insensitively). Everything else — `-logFile <path>`, `-nographics`, custom flags your project reads — is forwarded verbatim.
|
|
52
|
+
|
|
53
|
+
#### projects create
|
|
54
|
+
|
|
55
|
+
Create a project. On a TTY, prompts for any missing options (parent directory, editor version, template) and then asks whether to link the project to a Unity Cloud project — that last question defaults to **No**, so pressing Enter creates an unlinked project. In CI, pass `--non-interactive` or pipe stdin to suppress prompts and rely on stored defaults. The first positional argument is the project **name**; `--path` sets the parent directory:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
unity projects create MyGame --editor-version 6000.0.47f1 --template com.unity.template.3d
|
|
59
|
+
|
|
60
|
+
# Place the project in a specific directory
|
|
61
|
+
unity projects create MyGame --path /path/to/projects --editor-version 6000.0.47f1
|
|
62
|
+
|
|
63
|
+
# --template also accepts a .tgz file path or a directory, not just a registered template id
|
|
64
|
+
unity projects create MyGame --template /path/to/template.tgz
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Cloud linking during creation:**
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Create and link a NEW Unity Cloud project as part of creation
|
|
71
|
+
unity projects create MyGame --cloud --cloud-org <id-or-name>
|
|
72
|
+
|
|
73
|
+
# Link an EXISTING cloud project instead
|
|
74
|
+
unity projects create MyGame --cloud-project <id-or-name>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Passing any of `--cloud`, `--cloud-project`, or `--cloud-org` answers the cloud question, so it is not asked again. The question is also skipped in every machine output mode (`--json`, `--format tsv|ndjson`, `--quiet`), under `--non-interactive` (or `UNITY_NON_INTERACTIVE`), when stdout is not a TTY, and when the current credentials cannot create a cloud project (signed out, or service-account auth) — those keep today's flag-only, default-off behaviour. Unlike the other three questions, this one can fire even when every option was supplied on the command line, so `--non-interactive` is what keeps a fully-specified scripted run from stopping on it. Be aware that the global currently gates **only** this question: the parent-directory, editor-version, and template questions still gate on terminal interactivity alone, so `--non-interactive` on a TTY does not make them fall back to stored defaults. For a fully unattended run on a terminal, pass `--path`, `--editor-version`, and `--template` as well — or use `projects new`, which never prompts at all.
|
|
78
|
+
|
|
79
|
+
Answering Yes never costs you the project: if the link cannot be set up (expired session, no resolvable organization), the project is still created unlinked and the reason is reported as a warning, exit 0. `--cloud` behaves differently and still fails outright — an explicit flag is a contract, not a suggestion.
|
|
80
|
+
|
|
81
|
+
When a project is created without a cloud link, human output ends with a line pointing at `unity projects link cloud`. It is human-format only: `json`, `ndjson`, and `tsv` output is unchanged.
|
|
82
|
+
|
|
83
|
+
For machine consumers, cloud state is reported by the presence of the `cloudLinked`, `cloudProject`, and `cloudOrgSource` fields on the result payload — they are emitted **only when a cloud link was requested**. Their absence is itself the signal that the project is unlinked; do not read `cloudLinked` expecting a `false`.
|
|
84
|
+
|
|
85
|
+
**Source-control during creation** — publish the new project to a fresh repository:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
unity projects create MyGame \
|
|
89
|
+
--vcs github \
|
|
90
|
+
--git-namespace my-org \
|
|
91
|
+
--git-repo my-game \
|
|
92
|
+
--git-visibility private \
|
|
93
|
+
--git-default-branch main \
|
|
94
|
+
--git-token-stdin
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Source-control flags (shared with `projects link vcs`): `--vcs github|gitlab|uvcs|<host>`, `--git-namespace <name>`, `--git-repo <name>`, `--git-visibility private|public|internal` (default private), `--git-default-branch <name>`, `--git-remote-protocol https|ssh` (default https), `--git-description <text>`, `--git-token <pat>` / `--git-token-stdin`, `--no-initial-commit`, `--git-lfs`, and `--vcs-region <name>` for Unity Version Control.
|
|
98
|
+
|
|
99
|
+
**Flag names differ by subcommand:** `projects create` and `projects link vcs` use `--git-namespace` / `--git-repo`, while `projects clone` (below) uses `--vcs-namespace` / `--vcs-repo`. Copy the names for the exact command you're running, and confirm with `--help` if unsure.
|
|
100
|
+
|
|
101
|
+
**`--git-remote-protocol ssh` attaches the created repository's SSH remote instead of its HTTPS one.** The provider REST call that creates the repository still needs the resolved PAT — SSH has no equivalent for that API call — but the local `origin` remote and the initial push then use the repository's `git@<host>:<owner>/<repo>.git` form with pure ambient SSH auth (the running ssh-agent, a repository-local `core.sshCommand`, or an `~/.ssh/config` host alias — whichever the machine already has configured; the CLI never handles keys itself). Passing `--git-token`/`--git-token-stdin` alongside `--git-remote-protocol ssh` is fine: the token still authenticates the repository-creation API call, it's only the git transport that switches.
|
|
102
|
+
|
|
103
|
+
**Self-hosted hosts create through a provider CLI, not REST.** `--vcs` also accepts a bare host (e.g. `--vcs gitea.example.com`) for anything other than github.com/gitlab.com — there is no built-in REST client for those, so the repository is created through `gh`, `glab`, or `tea`, whichever is installed and already signed in for that host (checked in that order). The same fallback covers github/gitlab themselves when no REST token can be resolved: the matching CLI (`gh` for github, `glab` for gitlab) steps in if it is signed in, before the command gives up. No PAT is ever read, stored, or forwarded on a provider-CLI path. When a provider CLI created the repository, the machine-readable result carries `vcs.mechanism` (`gh` | `glab` | `tea`) naming which one — omitted for the REST path and for a `[url]`-form link, so existing scripted consumers see no change on github.com/gitlab.com. If nothing can create it — no REST token and no signed-in provider CLI for that host — the error explains creating the repository yourself and linking it with `unity projects link vcs <path> <url>`.
|
|
104
|
+
|
|
105
|
+
**Where the Git token comes from.** Resolution order, first hit wins: `--git-token-stdin` → `--git-token` → `UNITY_GITHUB_TOKEN` / `UNITY_GITLAB_TOKEN` → `git credential fill` (the user's credential helper) → an interactive masked prompt. The first three are explicit per-command overrides and always beat the helper. **The CLI stores no Git token** at any tier, including one typed at the prompt.
|
|
106
|
+
|
|
107
|
+
**Whether anyone is there to answer is decided up front.** On a real terminal, a configured credential helper is free to run its own sign-in — including Git Credential Manager's browser and device-code flows — and its instructions are relayed to you rather than swallowed. Without a terminal, in CI, under a machine-readable `--format`, or with `--non-interactive`, nothing prompts at all: the command fails immediately with **exit 4**, naming the credential it needed and how to supply it out of band (`--git-token[-stdin]` or the env vars above). Interaction is judged on all three standard streams, so redirecting stderr alone can no longer leave a password prompt writing into a file while waiting on a keystroke you were never shown.
|
|
108
|
+
|
|
109
|
+
The credential lookup passes the full repository URL, so a helper that keeps one account per URL can return a different token per organization, but only when `credential.useHttpPath` is set, since git otherwise withholds the path from helpers:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
git config --global credential.useHttpPath true
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Per-project identity instead lives in the repository's own config (`credential.useHttpPath`, `credential.username` in its `.git/config`); `projects link vcs` runs the lookup inside the project, so the Hub, the CLI, and plain `git` all resolve the same credential. For a CI pipeline spanning several organizations, pass `--git-token-stdin` per invocation: the env vars hold one token per provider, and there is no per-org variant.
|
|
116
|
+
|
|
117
|
+
Per-organization scoping needs the organization to be known before the credential is looked up. `projects clone` always requires `--vcs-namespace`, so it is always scoped. `projects create` and `projects link vcs` take `--git-namespace`, and when it is omitted the lookup stays host-scoped, because the namespace cannot be resolved until you are authenticated and you cannot authenticate without a credential. Pass `--git-namespace` to target a specific organization's credential.
|
|
118
|
+
|
|
119
|
+
#### projects new
|
|
120
|
+
|
|
121
|
+
Create a project without any interactive prompts — resolves missing options from stored defaults, never asks the user. The first positional argument is the project **name**; `--path` sets the parent directory:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# All omitted options resolve from stored defaults
|
|
125
|
+
unity projects new MyGame
|
|
126
|
+
|
|
127
|
+
# Override stored defaults with explicit values
|
|
128
|
+
unity projects new MyGame --path /path/to/projects --editor-version 6000.0.47f1 --template com.unity.template.3d
|
|
129
|
+
|
|
130
|
+
# Open the project immediately after creation
|
|
131
|
+
unity projects new MyGame --open
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
`new` never links to Unity Cloud and never asks. Its human output ends with the same pointer at `unity projects link cloud`; machine output is unchanged. To link during creation, use `projects create --cloud`, or link afterwards with `projects link cloud`.
|
|
135
|
+
|
|
136
|
+
#### projects clone
|
|
137
|
+
|
|
138
|
+
Clone a remote repository and register the Unity project it contains. Works across providers:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# Clone by provider + namespace + repo
|
|
142
|
+
unity projects clone --vcs github --vcs-namespace my-org --vcs-repo my-game --path ./MyGame
|
|
143
|
+
|
|
144
|
+
# Check out a specific ref (branch, sha, or UVCS changeset)
|
|
145
|
+
unity projects clone --vcs uvcs --vcs-namespace my-org --vcs-repo my-game --ref main
|
|
146
|
+
|
|
147
|
+
# Authenticate with a personal access token (prefer stdin)
|
|
148
|
+
unity projects clone --vcs gitlab --vcs-namespace my-org --vcs-repo my-game --git-token-stdin
|
|
149
|
+
|
|
150
|
+
# Project lives in a subdirectory of the repo
|
|
151
|
+
unity projects clone --vcs github --vcs-namespace my-org --vcs-repo monorepo \
|
|
152
|
+
--path ./repo --project-path packages/MyGame
|
|
153
|
+
|
|
154
|
+
# Clone an arbitrary git URL instead (HTTPS, or SSH via the standard
|
|
155
|
+
# git user@host:path shorthand) — no --vcs/--vcs-namespace/--vcs-repo needed
|
|
156
|
+
unity projects clone https://github.com/my-org/my-game.git
|
|
157
|
+
unity projects clone --ref develop <ssh-clone-url-for-your-host>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Options: `--vcs github|gitlab|uvcs`, `--vcs-namespace <name>`, `--vcs-repo <name>`, `--ref <branch|sha|changeset>` (an all-digit ref is treated as a Unity Version Control changeset, anything else as a branch), `--path <dest>` (clone destination), `--project-path <subpath>` (project subdirectory), `--git-token <pat>` / `--git-token-stdin`, `--json`. Git LFS assets are fetched as pointer files only.
|
|
161
|
+
|
|
162
|
+
**The `[url]` form is an alternative to `--vcs`/`--vcs-namespace`/`--vcs-repo`, not an addition to them** — passing a URL alongside any of those three flags is a bad-arguments error. `--ref`, `--path`, `--project-path`, `--no-lfs` always apply. `--git-token`/`--git-token-stdin` only apply when the URL is an **explicit HTTPS** URL whose host is github.com or gitlab.com — passing a token for any other host (an SSH-form or SCP-style URL, or a host that isn't github.com/gitlab.com) is a bad-arguments error, since there's nowhere for that credential to go. No token is required: with none supplied, the clone runs with whatever git auth is already set up on the machine (SSH agent, a configured credential helper, `.netrc`, or userinfo embedded in the URL itself) — this includes every SSH-form clone, even against github.com/gitlab.com, since the provider credential helper is HTTPS-only. Unity-project detection is **always** a post-clone scan of the downloaded tree for the URL form (never a provider API call, regardless of host or token) — only Git LFS credentials differ by tier: an HTTPS URL to github.com/gitlab.com with a token uses the provider-scoped LFS credential helper, everything else uses the machine's own git auth for the LFS pull too. A malformed URL, an unreachable host, a rejected/unknown SSH host key, and an authentication failure are reported as distinct errors (exit 2, 7, 3, and 3 respectively).
|
|
163
|
+
|
|
164
|
+
**SSH transport policy.** No SSH URL is ever rewritten to HTTPS, and no key handling happens in the CLI — a key held by a running ssh-agent is used automatically, and a repository-local `core.sshCommand` or an `~/.ssh/config` host alias behaves identically to plain `git`, because the CLI only supplies its own SSH defaults when none of those (nor `GIT_SSH_COMMAND`/`GIT_SSH`) are already set — and it supplies none of them at all on an interactive terminal, deferring entirely to ssh's own prompts (a real fingerprint prompt for an unfamiliar host, a real passphrase prompt for a protected key with no agent), since a person at the terminal can answer them. Only in a non-interactive invocation (no TTY, or `--non-interactive`/`UNITY_NON_INTERACTIVE`), where no prompt could ever be answered, does the CLI supply its own defaults: an unknown host is trusted on first connect and pinned (so a *later* change to that host's key still fails loudly — this is not silenced), and a passphrase-protected key with no agent fails fast with an actionable error instead of hanging.
|
|
165
|
+
|
|
166
|
+
#### Connecting to a self-hosted or enterprise host
|
|
167
|
+
|
|
168
|
+
GitHub Enterprise Server, self-managed GitLab, and self-hosted Gitea/Forgejo all work with the URL form of `projects clone` and `projects link vcs` (not `projects create --vcs`, which accepts only `github`, `gitlab`, and `uvcs`), but **each host signs in separately**: being signed in to github.com grants nothing on `ghe.example.com`. The first attempt against a new host fails to authenticate (exit 3) until you sign in to that host specifically; the CLI then prints the exact command for whichever mechanism your machine has.
|
|
169
|
+
|
|
170
|
+
Three ways in, any one is enough:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# 1. The provider's own CLI, scoped to the host (enables repo browsing/creation)
|
|
174
|
+
gh auth login --hostname ghe.example.com
|
|
175
|
+
glab auth login --hostname gitlab.example.com
|
|
176
|
+
tea login add --name work --url https://gitea.example.com
|
|
177
|
+
|
|
178
|
+
# 2. Git Credential Manager: one credential per host, no per-host setup,
|
|
179
|
+
# picked up once `git credential approve` has stored one for that host
|
|
180
|
+
|
|
181
|
+
# 3. SSH: needs neither of the above; uses your SSH agent
|
|
182
|
+
unity projects clone <ssh-clone-url-for-your-host>
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
`gh` and `glab` hold one session per host and can be signed in to several simultaneously, which is why the sign-in commands are host-scoped rather than bare. `tea` has no default host at all: every login is a named entry for one instance URL.
|
|
186
|
+
|
|
187
|
+
The CLI reads and stores no token on any of these paths. It asks each installed provider CLI whether it holds a session for that specific host, with credential-bearing environment variables stripped from the child process: `gh` otherwise applies `GH_ENTERPRISE_TOKEN` to any non-cloud host and dials it to validate, which would leak the token to a host that merely appeared in a failing URL. Stripped, `gh` answers from its own config: an unconfigured host is never contacted. Side effect: authenticating purely via `GH_ENTERPRISE_TOKEN` (no `gh auth login` entry) reads as signed out, so you may be offered a sign-in you do not need. A host with no provider CLI available is not a dead end: plain git still clones and pushes, with credentials from the credential manager or the SSH agent. Note `--git-token`/`--git-token-stdin` still only apply to github.com and gitlab.com over HTTPS; for any other host, rely on one of the three paths above.
|
|
188
|
+
|
|
189
|
+
#### projects pin / unpin
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
# Pin a project to the top of the list
|
|
193
|
+
unity projects pin /path/to/MyProject
|
|
194
|
+
|
|
195
|
+
# Unpin
|
|
196
|
+
unity projects unpin /path/to/MyProject
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
#### projects size
|
|
200
|
+
|
|
201
|
+
Report a project's on-disk footprint broken down by top-level folder (Assets, Library, Packages, …) with a total, so you can see how much is regenerable build state (Library, Temp) versus source and assets:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
# Size of one project (defaults to the current project when the argument is omitted)
|
|
205
|
+
unity projects size /path/to/MyProject
|
|
206
|
+
|
|
207
|
+
# Summarize every registered project, largest first
|
|
208
|
+
unity projects size --all
|
|
209
|
+
|
|
210
|
+
# Machine output — raw bytes instead of readable KB/MB/GB units
|
|
211
|
+
unity projects size --all --json
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Human output uses readable units; `--json` (and `--format ndjson`) emit raw byte counts.
|
|
215
|
+
|
|
216
|
+
#### projects clean
|
|
217
|
+
|
|
218
|
+
The counterpart to `projects size`: deletes the **regenerable** folders (`Library`, `Temp`, `Logs`, …) to reclaim disk space. Unity rebuilds them on the next open — at the cost of a slow first import.
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
# Preview: what would be deleted, with sizes — deletes nothing
|
|
222
|
+
unity projects clean --dry-run
|
|
223
|
+
|
|
224
|
+
# Clean the current project (prompts to confirm)
|
|
225
|
+
unity projects clean
|
|
226
|
+
|
|
227
|
+
# Clean a project by path or registered name
|
|
228
|
+
unity projects clean ./MyGame
|
|
229
|
+
|
|
230
|
+
# Non-interactive: --yes is REQUIRED in a script or CI
|
|
231
|
+
unity projects clean MyGame --yes
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
The project argument defaults to the current directory and accepts a path or a registered project name. Guardrails worth relying on:
|
|
235
|
+
|
|
236
|
+
- **It refuses while the project is open in a running editor**, naming the PID — cleaning `Library` under a live editor corrupts the session. If the CLI cannot determine whether an editor has it open, it warns and proceeds, so close editors first in automation.
|
|
237
|
+
- **It refuses to delete unprompted.** In a non-interactive shell without `-y, --yes` it stops rather than deleting.
|
|
238
|
+
- A path that isn't a Unity project (no `ProjectVersion.txt`) is rejected outright, so a mistyped path can't delete anything.
|
|
239
|
+
|
|
240
|
+
`--dry-run` is the safe way to size the win first; it reports what it *would* reclaim and exits without touching the filesystem.
|
|
241
|
+
|
|
242
|
+
#### projects verify
|
|
243
|
+
|
|
244
|
+
An Editor-free integrity check on the **project**, meant as the first step of a CI job. `unity doctor` answers "can this machine build?"; this answers "is this project sound?" — the version-control damage that otherwise surfaces after the expensive build step, as a confusing import error or an artifact that is wrong rather than missing:
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
# Verify the current project
|
|
248
|
+
unity projects verify
|
|
249
|
+
|
|
250
|
+
# Verify a project by path or registered name
|
|
251
|
+
unity projects verify ./MyGame
|
|
252
|
+
|
|
253
|
+
# CI gate: warnings fail the job too
|
|
254
|
+
unity projects verify --strict
|
|
255
|
+
|
|
256
|
+
# Only the checks you care about (either spelling works)
|
|
257
|
+
unity projects verify --check meta-missing,guid-duplicate
|
|
258
|
+
|
|
259
|
+
# Confirm the project targets the version the pipeline pins
|
|
260
|
+
unity projects verify --expect-editor 6000.0.30f1
|
|
261
|
+
|
|
262
|
+
# Inline annotations on the job, anchored to the offending file and line
|
|
263
|
+
unity projects verify --format github
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Exits `0` when nothing error-severity is found, `6` otherwise. Warnings alone still exit `0` — `--strict` promotes them. Every finding carries a stable code, a severity, a project-relative path, and a remediation hint:
|
|
267
|
+
|
|
268
|
+
| Code | Severity | Detects |
|
|
269
|
+
|---|---|---|
|
|
270
|
+
| `META_MISSING` | error | An asset under `Assets/` with no sibling `.meta`. Unity assigns a fresh guid, silently breaking every reference to it. |
|
|
271
|
+
| `META_ORPHAN` | warning | A `.meta` whose asset no longer exists. |
|
|
272
|
+
| `GUID_DUPLICATE` | error | Two `.meta` files claiming the same `guid` — typically two branches that each added one. |
|
|
273
|
+
| `CONFLICT_MARKERS` | error | Unresolved merge markers in a `.meta`, `ProjectSettings/*.asset`, `Packages/manifest.json`, or `packages-lock.json`. |
|
|
274
|
+
| `MANIFEST_INVALID` | error | `Packages/manifest.json` does not parse, or a dependency version is not a string. |
|
|
275
|
+
| `EDITOR_VERSION_DRIFT` | warning | `ProjectVersion.txt` disagrees with `--expect-editor`. |
|
|
276
|
+
| `PATH_UNVERIFIABLE` | warning | A path the scan did not inspect, named so you know which subtree went unchecked. Always on — not selectable via `--check`. |
|
|
277
|
+
|
|
278
|
+
Worth knowing:
|
|
279
|
+
|
|
280
|
+
- **Editor-version drift is opt-in.** Nothing in the CLI stores a pinned version, so the check only runs when you pass `--expect-editor <version>` — the version your pipeline pins.
|
|
281
|
+
- **`--format json` returns the full report** (findings plus an errors/warnings/filesScanned summary); **`--format ndjson` emits one `type: "finding"` record per finding** as it is found, then a terminal result frame. Piped stdout defaults to `tsv`, like the rest of the CLI.
|
|
282
|
+
- **Safe to paste into a public log.** Finding paths are project-relative, terminal-escape-stripped, and the project root has its home directory masked.
|
|
283
|
+
- **It is built to scan an untrusted repository** — a fork, an unreviewed pull-request branch, a third-party template. So it refuses to follow a symlinked `Assets/`, `ProjectSettings/`, or `Packages/` (exit 6, `PROJECTS_VERIFY_UNSCANNABLE_DIR`), which would otherwise make it enumerate or read a tree outside the project into your CI log, and it bounds every file read at 16 MiB. A symlink **deeper** in the tree is not refused — it is skipped and reported (next bullet), since one link inside `Assets/` should not fail the whole scan.
|
|
284
|
+
- **`summary.unverifiable` tells you whether the pass is complete, and each skipped path is named.** Anything the scan could not inspect — a symlinked directory or file at any depth, an unreadable subtree, a walk past the depth cap, an over-budget file, a missing `Assets/` — is counted there and reported as a `PATH_UNVERIFIABLE` warning carrying the path, so you can see which subtree went unchecked instead of only how many did. Under `--strict` those warnings promote to errors like any other, so a project cannot satisfy the gate by making verification impossible rather than by being sound.
|
|
285
|
+
- **`--expect-editor` must be a real Unity version.** A typo like `6000.x` exits 2 rather than becoming a drift warning that passes — otherwise a misconfigured pipeline would silently satisfy its own version gate.
|
|
286
|
+
- **`data.checks` lists what actually ran.** `EDITOR_VERSION_DRIFT` is absent unless you passed `--expect-editor`, since without a version to compare against there is nothing to check.
|
|
287
|
+
- **No Editor, no license, no network, no installed editor** — and it does not read asset bodies, so it stays fast on a large project.
|
|
288
|
+
- **Detection only.** It does not repair anything; fixing meta/guid divergence needs the Editor's own asset database.
|
|
289
|
+
- Names Unity's importer ignores (dot-prefixed, `~`-suffixed, `.tmp`, `cvs`) are skipped, so a `.gitignore` or a `Documentation~` folder never reports a missing `.meta`.
|
|
290
|
+
|
|
291
|
+
#### projects require
|
|
292
|
+
|
|
293
|
+
Ensure the editor version required by a project is installed, installing it if needed:
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
unity projects require /path/to/MyProject --yes
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
On a TTY with no path, prompts interactively.
|
|
300
|
+
|
|
301
|
+
#### projects upgrade
|
|
302
|
+
|
|
303
|
+
Upgrade a project to a different Unity editor version. `--to` is required:
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
unity projects upgrade --to 6000.0.47f1
|
|
307
|
+
unity projects upgrade /path/to/MyProject --to 6000.0.47f1 --yes
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
#### projects export / import
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
# Export the project registry to a file (or stdout if -o is omitted)
|
|
314
|
+
unity projects export -o projects.json
|
|
315
|
+
|
|
316
|
+
# Import a previously exported registry
|
|
317
|
+
unity projects import projects.json
|
|
318
|
+
unity projects import --input projects.json
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
#### projects exec — run a command across every registered project
|
|
322
|
+
|
|
323
|
+
Run one command in each registered project. The command runs in that project's own directory, with `UNITY_PROJECT_PATH` and `UNITY_EDITOR_VERSION` set in its environment. Everything after `--` is the command:
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
# Every registered project
|
|
327
|
+
unity projects exec -- git status --short
|
|
328
|
+
|
|
329
|
+
# Only pinned projects
|
|
330
|
+
unity projects exec --filter pinned -- git pull
|
|
331
|
+
|
|
332
|
+
# Only Unity 6 projects, four at a time, without stopping on failures
|
|
333
|
+
unity projects exec --filter 'version:6000.*' --parallel 4 --continue-on-error -- npm test
|
|
334
|
+
|
|
335
|
+
# See what would run, without running it
|
|
336
|
+
unity projects exec --dry-run --filter 'name:My*' -- ./build.sh
|
|
337
|
+
|
|
338
|
+
# Machine-readable per-project results
|
|
339
|
+
unity projects exec --json -- git rev-parse HEAD
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
`--filter` is repeatable and every term must match (AND):
|
|
343
|
+
|
|
344
|
+
| Term | Matches |
|
|
345
|
+
|---|---|
|
|
346
|
+
| `name:<glob>` | project name or path — a bare glob (`My*`) is shorthand for this |
|
|
347
|
+
| `version:<glob>` | the project's required editor version (`6000.*`) |
|
|
348
|
+
| `pinned` / `pinned:false` | pin state; bare `pinned` means pinned |
|
|
349
|
+
|
|
350
|
+
Globs are path-aware, so use `**/` to match inside a path: `name:My*` matches by project name, `name:**/work/*` by location.
|
|
351
|
+
|
|
352
|
+
Behavior worth knowing:
|
|
353
|
+
|
|
354
|
+
- Projects run **one at a time** and the run **stops at the first failure**. Raise `--parallel <n>` for concurrency, or pass `--continue-on-error` to run the whole fleet regardless. With `--parallel > 1`, each project's output is buffered and flushed when it finishes so runs can't interleave; "stop" then means no *new* projects start — those already running finish.
|
|
355
|
+
- Buffered output is capped at **4 MiB per project**, after which it is cut short and the run warns. Sequential mode (`--parallel 1`) streams live and is never capped, so use it when you need the full output of a chatty command.
|
|
356
|
+
- **Ctrl-C** stops scheduling *and* terminates the projects already running, then exits **130**.
|
|
357
|
+
- Exit code is **6** if any project failed, **2** for a usage error (unknown filter key, bad `--parallel`, a command not on your `PATH`), **0** otherwise. No matching projects is a success (exit 0) with a warning.
|
|
358
|
+
- Arguments are passed to the command **verbatim, not through a shell** — pipes, `&&`, and shell globbing are not available. Put that logic in a script and exec the script.
|
|
359
|
+
- In `--json` / `--format ndjson` / `--format tsv`, the child's own output goes to **stderr** so stdout stays machine-parseable.
|
|
360
|
+
- `--format ndjson` streams one `{"type":"project",…}` frame per project as it settles and always closes with the standard `{"type":"result",…}` envelope (`success`, `command`, `data`, `errors`, `warnings`) — including under `--dry-run`.
|
|
361
|
+
|
|
362
|
+
#### projects open / link / unlink
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
# Open a registered project by name, fuzzy title match, or path
|
|
366
|
+
unity projects open MyProject
|
|
367
|
+
# (the top-level `unity open` is the same thing)
|
|
368
|
+
|
|
369
|
+
# --- Cloud links ---
|
|
370
|
+
# Connect an existing local project to a Unity Cloud project
|
|
371
|
+
unity projects link cloud /path/to/MyProject --cloud-org <id-or-name>
|
|
372
|
+
# Disconnect from its Unity Cloud project
|
|
373
|
+
unity projects unlink cloud /path/to/MyProject
|
|
374
|
+
|
|
375
|
+
# --- Version-control links ---
|
|
376
|
+
# Publish a local project to a NEW GitHub / GitLab / Unity Version Control repository
|
|
377
|
+
unity projects link vcs /path/to/MyProject \
|
|
378
|
+
--vcs github --git-namespace my-org --git-repo my-game --git-token-stdin
|
|
379
|
+
# Attach to an ALREADY-EXISTING remote instead of creating one — pass its URL
|
|
380
|
+
unity projects link vcs /path/to/MyProject https://github.com/my-org/my-game.git
|
|
381
|
+
# Remove a project's git remotes (the remote repositories are NOT deleted)
|
|
382
|
+
unity projects unlink vcs /path/to/MyProject
|
|
383
|
+
# Also detach the Unity Version Control workspace
|
|
384
|
+
unity projects unlink vcs /path/to/MyProject --unlink-workspace
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
`link vcs` shares the source-control flag set documented under `projects create`. `link cloud` / `link vcs` accept `--cloud-org <id-or-name>` (env `UNITY_CLOUD_ORG`).
|
|
388
|
+
|
|
389
|
+
The `[url]` second operand attaches to a remote that already exists, instead of creating one — the one thing the flag form of `link vcs` cannot do. It is mutually exclusive with `--vcs`, `--git-namespace`, `--git-repo`, `--git-visibility`, `--git-default-branch`, `--git-remote-protocol`, `--git-description`, `--cloud-org`, and `--cloud-project` (all meaningless without a repository to create — the URL's own scheme already says which transport to use). `--git-token[-stdin]`, `--no-initial-commit`, and `--git-lfs` still apply, and the same ambient-auth / Tier A rules as `projects clone [url]` govern whether the push uses a supplied token or the machine's own git auth.
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
### Releases — browse Unity versions
|
|
394
|
+
|
|
395
|
+
```bash
|
|
396
|
+
# List recent releases
|
|
397
|
+
unity releases --format json
|
|
398
|
+
|
|
399
|
+
# Filter by stream (alpha, beta, lts, tech)
|
|
400
|
+
unity releases --stream lts --format json
|
|
401
|
+
unity releases --stream tech --format json
|
|
402
|
+
unity releases --stream beta --format json
|
|
403
|
+
|
|
404
|
+
# LTS only shorthand
|
|
405
|
+
unity releases --lts --format json
|
|
406
|
+
|
|
407
|
+
# Filter from a year onward
|
|
408
|
+
unity releases --since 2023 --format json
|
|
409
|
+
|
|
410
|
+
# Paginate
|
|
411
|
+
unity releases --limit 10 --skip 20 --format json
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
### Templates
|
|
417
|
+
|
|
418
|
+
```bash
|
|
419
|
+
# List templates for an editor version (uses default editor if --editor is omitted)
|
|
420
|
+
unity templates list --editor 6000.0.47f1 --format json
|
|
421
|
+
|
|
422
|
+
# List only locally installed templates
|
|
423
|
+
unity templates list --editor 6000.0.47f1 --installed --format json
|
|
424
|
+
|
|
425
|
+
# Filter by type (core, learning, sample, custom, new, all) — case-insensitive
|
|
426
|
+
unity templates list --editor 6000.0.47f1 --type core --format json
|
|
427
|
+
unity templates list --editor 6000.0.47f1 --type learning --format json
|
|
428
|
+
unity templates list --editor 6000.0.47f1 --type sample --format json
|
|
429
|
+
unity templates list --editor 6000.0.47f1 --type new --format json
|
|
430
|
+
unity templates list --editor 6000.0.47f1 --type all --format json # no-op, returns everything
|
|
431
|
+
|
|
432
|
+
# List only user-generated (custom) templates
|
|
433
|
+
unity templates list --editor 6000.0.47f1 --custom --format json
|
|
434
|
+
# --type custom is an alias for --custom
|
|
435
|
+
unity templates list --editor 6000.0.47f1 --type custom --format json
|
|
436
|
+
|
|
437
|
+
# --custom and --type are mutually exclusive — using both is an error (exit 1)
|
|
438
|
+
|
|
439
|
+
# Show template details
|
|
440
|
+
unity templates info com.unity.template.3d --editor 6000.0.47f1 --format json
|
|
441
|
+
|
|
442
|
+
# Create a custom template from an existing Unity project
|
|
443
|
+
# --name and --display-name are REQUIRED
|
|
444
|
+
unity templates create /path/to/MyProject \
|
|
445
|
+
--name com.myorg.template.mytemplate \
|
|
446
|
+
--display-name "My Template"
|
|
447
|
+
|
|
448
|
+
# With all optional options
|
|
449
|
+
unity templates create /path/to/MyProject \
|
|
450
|
+
--name com.myorg.template.mytemplate \
|
|
451
|
+
--display-name "My Template" \
|
|
452
|
+
--description "A starting point for our projects" \
|
|
453
|
+
--template-version 1.0.0 \
|
|
454
|
+
--output /path/to/templates/dir \
|
|
455
|
+
--keep-embedded-packages \
|
|
456
|
+
--keep-project-settings \
|
|
457
|
+
--overwrite
|
|
458
|
+
|
|
459
|
+
# JSON output (includes path to created .tgz archive)
|
|
460
|
+
unity templates create /path/to/MyProject \
|
|
461
|
+
--name com.myorg.template.mytemplate \
|
|
462
|
+
--display-name "My Template" \
|
|
463
|
+
--json
|
|
464
|
+
|
|
465
|
+
# NDJSON streaming — emits progress frames then a result frame
|
|
466
|
+
unity templates create /path/to/MyProject \
|
|
467
|
+
--name com.myorg.template.mytemplate \
|
|
468
|
+
--display-name "My Template" \
|
|
469
|
+
--format ndjson
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
**`templates create` key notes:**
|
|
473
|
+
- `--name` must be a valid npm package name (e.g. `com.myorg.template.mytemplate`)
|
|
474
|
+
- `--output` overrides the Hub-configured user templates directory
|
|
475
|
+
- `--overwrite` replaces an existing archive of the same name without error
|
|
476
|
+
- On success, prints the path to the created `.tgz` archive
|
|
477
|
+
- Created templates appear in `unity templates list --editor <v> --custom`
|
|
478
|
+
|
|
479
|
+
**`templates pack` — portable archive, not a registered template.** `create` installs into the Hub-configured user templates directory so the template shows up in `templates list --custom`; `pack` writes a standalone `.tgz` to a file path you choose and registers nothing. Reach for `pack` when the archive is an artifact to check in, attach to a release, or hand to someone else.
|
|
480
|
+
|
|
481
|
+
```bash
|
|
482
|
+
# Pack a project into a portable template archive (--output is REQUIRED)
|
|
483
|
+
unity templates pack ./MyProject \
|
|
484
|
+
--output ./my-template.tgz \
|
|
485
|
+
--name com.myorg.template.mytemplate \
|
|
486
|
+
--display-name "My Template"
|
|
487
|
+
|
|
488
|
+
# Minimal form — prompts for name and display name on a TTY
|
|
489
|
+
unity templates pack ./MyProject --output ./my-template.tgz
|
|
490
|
+
|
|
491
|
+
# Replace an existing archive, with machine output
|
|
492
|
+
unity templates pack ./MyProject --output ./my-template.tgz --overwrite --json
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
**`templates pack` key notes:**
|
|
496
|
+
- `--output <file>` is a **file path**, not a directory, and is required
|
|
497
|
+
- `--name` and `--display-name` are required; on a TTY they're prompted for when omitted, so pass both in CI
|
|
498
|
+
- Use `--template-version`, **not** `--version` — the latter collides with the global `-V, --version` flag
|
|
499
|
+
- The output path may not be **inside** the project being packed; that's rejected, so the archive can't include itself
|
|
500
|
+
- An existing output file is an error unless `--overwrite` is passed
|
|
501
|
+
- `--keep-embedded-packages` and `--keep-project-settings` retain content that is otherwise stripped
|
|
502
|
+
- Consumable directly by project creation: `unity projects create MyGame --template ./my-template.tgz`
|
|
503
|
+
|
|
504
|
+
```bash
|
|
505
|
+
# Delete a user-generated custom template (prompts for confirmation)
|
|
506
|
+
unity templates delete com.myorg.template.mytemplate --editor 6000.0.47f1
|
|
507
|
+
|
|
508
|
+
# Skip the confirmation prompt (CI-friendly)
|
|
509
|
+
unity templates delete com.myorg.template.mytemplate --editor 6000.0.47f1 --yes
|
|
510
|
+
|
|
511
|
+
# JSON output
|
|
512
|
+
unity templates delete com.myorg.template.mytemplate --editor 6000.0.47f1 --yes --json
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
**`templates delete` key notes:**
|
|
516
|
+
- Only user-generated templates (created via Hub UI or `templates create`) can be deleted
|
|
517
|
+
- Attempting to delete a built-in Unity template exits with a descriptive error (exit 6)
|
|
518
|
+
- Attempting to delete a template that doesn't exist exits with a descriptive error (exit 6)
|
|
519
|
+
- In interactive mode, prompts for confirmation before deleting; use `--yes` to skip
|
|
520
|
+
- On success, the template no longer appears in `unity templates list --editor <v> --custom`
|
|
521
|
+
|
|
522
|
+
```bash
|
|
523
|
+
# Get/set/reset the default storage path for custom templates
|
|
524
|
+
# Print current configured templates location
|
|
525
|
+
unity templates location
|
|
526
|
+
|
|
527
|
+
# Set a new default templates directory (must exist as a directory)
|
|
528
|
+
unity templates location --set /path/to/templates
|
|
529
|
+
|
|
530
|
+
# Reset templates location to the Hub default
|
|
531
|
+
unity templates location --reset
|
|
532
|
+
|
|
533
|
+
# JSON output for any variant
|
|
534
|
+
unity templates location --json
|
|
535
|
+
unity templates location --set /path/to/templates --json
|
|
536
|
+
unity templates location --reset --json
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
**`templates location` key notes:**
|
|
540
|
+
- `--set` and `--reset` are mutually exclusive (using both is an error)
|
|
541
|
+
- `--set` validates that the path exists and is a directory (exits 2 if not)
|
|
542
|
+
- `--reset` restores the Hub default templates path
|
|
543
|
+
- JSON output: `{ "path": "..." }` inside the standard envelope
|
|
544
|
+
|
|
545
|
+
```bash
|
|
546
|
+
# Edit a user-generated (custom) template's metadata
|
|
547
|
+
# At least one of --display-name, --description, --template-version,
|
|
548
|
+
# --preview-image, --remove-preview-image is required
|
|
549
|
+
unity templates edit com.myorg.template.mytemplate --editor 6000.0.47f1 --display-name "My Updated Template"
|
|
550
|
+
|
|
551
|
+
# Update multiple fields at once
|
|
552
|
+
unity templates edit com.myorg.template.mytemplate \
|
|
553
|
+
--editor 6000.0.47f1 \
|
|
554
|
+
--display-name "My Updated Template" \
|
|
555
|
+
--description "A new description for the template" \
|
|
556
|
+
--template-version 1.1.0
|
|
557
|
+
|
|
558
|
+
# Replace / remove preview image
|
|
559
|
+
unity templates edit com.myorg.template.mytemplate --editor 6000.0.47f1 --preview-image /path/to/image.png
|
|
560
|
+
unity templates edit com.myorg.template.mytemplate --editor 6000.0.47f1 --remove-preview-image
|
|
561
|
+
|
|
562
|
+
# JSON / NDJSON output (--yes required because these are non-interactive)
|
|
563
|
+
unity templates edit com.myorg.template.mytemplate --editor 6000.0.47f1 --display-name "Updated" --yes --json
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
**`templates edit` key notes:**
|
|
567
|
+
- Only works on user-generated (custom) templates; built-in templates cannot be edited
|
|
568
|
+
- Use `--editor` to specify which editor version's template list to search, or omit to use the stored default
|
|
569
|
+
- `--preview-image <path>` resolves to an absolute path before passing to the service
|
|
570
|
+
- `--remove-preview-image` is only applied when no valid `--preview-image` path is given; if both are passed with a valid image path, the new image wins and `--remove-preview-image` is ignored
|
|
571
|
+
- On success (human format), prints the updated template's display name
|
|
572
|
+
|
|
573
|
+
---
|
|
574
|
+
|