From 770c8d43854f292aa0e7c693e5a676d21acdb6ee Mon Sep 17 00:00:00 2001 From: g1en Date: Thu, 22 Oct 2026 14:08:21 +0100 Subject: [PATCH] feat(CLI-2185): name unity projects link cloud in the domain skills Co-Authored-By: Claude Sonnet 5.5 --- skills/build-live-game/SKILL.md | 12 ++++++++++++ skills/setup-multiplayer-services/SKILL.md | 2 ++ 2 files changed, 14 insertions(+) diff --git a/skills/build-live-game/SKILL.md b/skills/build-live-game/SKILL.md index 5d5a48e..de13a1d 100644 --- a/skills/build-live-game/SKILL.md +++ b/skills/build-live-game/SKILL.md @@ -18,6 +18,7 @@ description: Builds and operates live games with Unity Services. Use when the us | `com.unity.services.tooling` | 1.4.1 | Access Control and Game Overrides | | `com.unity.services.apis` | 1.1.1 | Generated REST clients for all UGS services | +- [Link the Project to Unity Cloud](#link-the-project-to-unity-cloud) - [Initialization Pattern](#initialization-pattern) - [Package Map](#package-map) - [Architecture — How Packages Combine](#architecture--how-packages-combine) @@ -29,6 +30,17 @@ description: Builds and operates live games with Unity Services. Use when the us - [Deployment Checklist](#deployment-checklist) - [Detailed References](#detailed-references) +## Link the Project to Unity Cloud + +UGS needs the project linked to a Unity Cloud project (its project ID) before `UnityServices.InitializeAsync()` can work. Link it with the Unity CLI before writing service code: + +```bash +unity projects link cloud # create and link a cloud project +unity projects link cloud --cloud-project # link an existing cloud project +``` + +Never hand-edit `ProjectSettings/ProjectSettings.asset` and never write an Editor-side linker script. If unsure of the command, use the unity-cli skill or `unity commands --grep link`. + ## Initialization Pattern Every UGS game starts the same way. `com.unity.services.core` must initialize first, then the player signs in: diff --git a/skills/setup-multiplayer-services/SKILL.md b/skills/setup-multiplayer-services/SKILL.md index c2d98d1..bad2a7c 100644 --- a/skills/setup-multiplayer-services/SKILL.md +++ b/skills/setup-multiplayer-services/SKILL.md @@ -14,6 +14,8 @@ description: Guides real-time online multiplayer with Unity Multiplayer Services - **Dedicated game server (`Unity.Services.Multiplayer.Server`):** [dgs-entrypoint.md](references/dgs-entrypoint.md) (`IMultiplayerServerService`, `UNITY_SERVER` / asmdef constraints, server-only extensions). - **Lower-level service clients:** [underlying-services.md](references/underlying-services.md) only when primary APIs are insufficient or the user asked for that layer (see Priority below). +3. **Cloud link:** Multiplayer Services need the project linked to a Unity Cloud project (project ID) before any session, Relay, or matchmaking call works. If it is not linked, run `unity projects link cloud `, with `--cloud-project ` to link an existing cloud project. Never hand-edit `ProjectSettings/ProjectSettings.asset` and never write an Editor-side linker script. If unsure of the command, use the unity-cli skill or `unity commands --grep link`. + ## Priority: Multiplayer Sessions first When the task is **choosing** topology, discovery, match flow, or Netcode alignment—not only calling APIs—ground recommendations via [implementation-fit.md](references/implementation-fit.md) (conversation → project → short targeted questions).