← UnityCONTENT HISTORYWHAT CHANGED · RULE-BASED ANALYSIS
Update to Unity
Snapshot Sep 30, 2026 · 23:16 UTC · version 0.1.6-beta
Collection source: not recorded for this historical snapshot.
First saved snapshot
No earlier snapshot is available to establish a change.
Compare saved observations
Download comparison JSONFull technical diff · 0 changed fields
Full snapshot data
{
"description": "Build and operate a live game using Unity Services. Use when the user needs to implement, connect, or debug backend-driven features — battle passes, achievements, player progression, cloud saves, leaderboards, matchmaking, virtual economies, server-authoritative logic, anti-cheat, player accounts and authentication, remote configuration, feature flags, A/B testing, analytics, or cloud resource deployment. Triggers on live-ops, live service, backend, server authority, cloud code, cloud save, remote config, player data, retention, monetization loop, season pass, ranking, multiplayer sessions, lobbies, or any Unity Services integration.",
"included_files": [
{
"relative_path": "references/achievements.md",
"size_in_bytes": 29568
},
{
"relative_path": "references/apis.md",
"size_in_bytes": 11261
},
{
"relative_path": "references/authentication.md",
"size_in_bytes": 17988
},
{
"relative_path": "references/battlepass.md",
"size_in_bytes": 33766
},
{
"relative_path": "references/cloud-code.md",
"size_in_bytes": 21672
},
{
"relative_path": "references/cloud-save.md",
"size_in_bytes": 17172
},
{
"relative_path": "references/deployment.md",
"size_in_bytes": 8668
},
{
"relative_path": "references/player-account.md",
"size_in_bytes": 29884
},
{
"relative_path": "references/remote-config.md",
"size_in_bytes": 3384
},
{
"relative_path": "references/tooling.md",
"size_in_bytes": 14304
}
],
"name": "build-live-game",
"skill_md_contents": "---\nname: build-live-game\ndescription: Build and operate a live game using Unity Services. Use when the user needs to implement, connect, or debug backend-driven features — battle passes, achievements, player progression, cloud saves, leaderboards, matchmaking, virtual economies, server-authoritative logic, anti-cheat, player accounts and authentication, remote configuration, feature flags, A/B testing, analytics, or cloud resource deployment. Triggers on live-ops, live service, backend, server authority, cloud code, cloud save, remote config, player data, retention, monetization loop, season pass, ranking, multiplayer sessions, lobbies, or any Unity Services integration.\n---\n\n# Build a Live Game With Unity Gaming Services\n\n## UGS Packages\n\n| Package | Min Version | Purpose |\n|---|---|---|\n| `com.unity.services.core` | 1.16.0 | Initialization, dependency graph |\n| `com.unity.services.authentication` | 3.6.1 | Player sign-in and identity |\n| `com.unity.services.cloudcode` | 2.10.3 | Server-authoritative C# modules |\n| `com.unity.services.cloudsave` | 3.4.0 | Per-player and shared key-value storage |\n| `com.unity.remote-config` | 4.2.5 | Server-side game configuration |\n| `com.unity.services.deployment` | 1.7.2 | Deploy cloud resources from Editor |\n| `com.unity.services.tooling` | 1.4.1 | Access Control and Game Overrides |\n| `com.unity.services.apis` | 1.1.1 | Generated REST clients for all UGS services |\n\n- [Initialization Pattern](#initialization-pattern)\n- [Package Map](#package-map)\n- [Architecture — How Packages Combine](#architecture--how-packages-combine)\n- [Core Services — Quick Reference](#core-services--quick-reference)\n- [Asset Store Building Blocks](#asset-store-building-blocks)\n- [Ready-Made Feature Blueprints](#ready-made-feature-blueprints)\n- [Common Architecture Patterns](#common-architecture-patterns)\n- [Validation](#validation)\n- [Deployment Checklist](#deployment-checklist)\n- [Detailed References](#detailed-references)\n\n## Initialization Pattern\n\nEvery UGS game starts the same way. `com.unity.services.core` must initialize first, then the player signs in:\n\n```csharp\nusing Unity.Services.Core;\nusing Unity.Services.Authentication;\n\nawait UnityServices.InitializeAsync();\nawait AuthenticationService.Instance.SignInAnonymouslyAsync();\n// All other services are now ready\n```\n\nAfter `InitializeAsync()` completes, service singletons (e.g. `CloudSaveService.Instance`, `CloudCodeService.Instance`) are available.\n\n## Package Map\n\n### Foundation\n\n| Package | Purpose | Singleton / Entry Point |\n|---|---|---|\n| **Core** | Initialization, dependency graph, component registry | `UnityServices.InitializeAsync()` |\n| **Authentication** | Player sign-in (anonymous, social, Unity, username/password), identity | `AuthenticationService.Instance` |\n| **Services APIs** | Generated REST clients for all UGS services; admin API access via service accounts | Direct API classes |\n\n### Player Data and Configuration\n\n| Package | Purpose | Singleton / Entry Point |\n|---|---|---|\n| **Cloud Save** | Per-player key-value data (Default, Public, Protected) and game-wide Custom data | `CloudSaveService.Instance.Data.Player` / `.Data.Custom` |\n| **Remote Config** | Server-side game configuration, feature flags, JSON definitions | `RemoteConfigService.Instance` |\n| **Economy** | Virtual currencies, inventory items, purchases, stores | `EconomyService.Instance` |\n\n### Server Logic and Security\n\n| Package | Purpose | Singleton / Entry Point |\n|---|---|---|\n| **Cloud Code** | Server-authoritative C# modules for trusted writes and validation | `CloudCodeService.Instance` → `CallModuleEndpointAsync` |\n| **Tooling** | Author and deploy Access Control (`.ac`) and Game Overrides (`.ugo`) files | Editor-only (Deployment Window) |\n| **Deployment** | Deploy cloud resources (`.rc`, `.ac`, `.ccmr`, `.lb`, etc.) from the Unity Editor | Editor-only (Services > Deployment) |\n\n### Social and Competitive\n\n| Package | Purpose | Singleton / Entry Point |\n|---|---|---|\n| **Multiplayer** | Sessions, matchmaking, lobbies. Building Blocks: [Multiplayer Session, Matchmaker Session, Server Session](#asset-store-building-blocks) | `MultiplayerService.Instance` |\n| **Leaderboards** | Score submission, rankings, tiers, version history. Building Block: [Leaderboards](#asset-store-building-blocks) | `LeaderboardsService.Instance` |\n\n### Telemetry\n\n| Package | Purpose | Singleton / Entry Point |\n|---|---|---|\n| **Analytics** | Custom events, standard events, consent management | `AnalyticsService.Instance` |\n\n## Architecture — How Packages Combine\n\n```\n UnityServices.InitializeAsync()\n │\n ▼\n AuthenticationService\n (sign in → PlayerId)\n │\n ┌───────────────┼───────────────┐\n ▼ ▼ ▼\n Remote Config Cloud Save Economy\n (game config, (player state, (currencies,\n definitions, progress, inventory,\n feature flags) preferences) purchases)\n │ │ │\n └───────┬───────┘ │\n ▼ │\n Cloud Code │\n (server-authoritative │\n writes, validation, ◄─────────┘\n anti-cheat logic)\n │\n ┌───────┼───────┐\n ▼ ▼ ▼\n Cloud Save Economy Leaderboards\n (Protected (server (score\n writes) grants) submission)\n```\n\n**Key principle:** For any data that affects game integrity (XP, rewards, currency), route writes through Cloud Code modules. Direct client writes are only appropriate for non-sensitive data (preferences, display settings).\n\n## Core Services — Quick Reference\n\n### Authentication\n\n**Package:** `com.unity.services.authentication` (>= 3.6.1)\n\nHandles player identity. Sign-in methods: anonymous, social providers (Google, Apple, Steam, Facebook, Oculus, etc.), Unity browser, username/password, and device code flow.\n\nAfter sign-in: `PlayerId` and `PlayerName` are available. All sign-in methods fire the `SignedIn` event. `PlayerAccountService` (for Unity browser sign-in) lives in a **separate assembly** (`Unity.Services.Authentication.PlayerAccounts`).\n\n- **Full reference:** [references/authentication.md](references/authentication.md)\n- **Building Block:** [Player Account](#asset-store-building-blocks) — ready-made sign-in UI and identity management\n\n### Cloud Code\n\n**Package:** `com.unity.services.cloudcode` (>= 2.10.3)\n\nRuns server-side C# modules (.NET 9) for trusted operations. Modules are deployed as `.ccmr` files. The client calls:\n\n```csharp\nvar result = await CloudCodeService.Instance.CallModuleEndpointAsync<TResult>(\n \"ModuleName\", \"FunctionName\", args);\n```\n\nPrefer C# modules over JavaScript scripts for production. Modules also support real-time push messages via subscriptions, event-driven triggers, and multiplayer session scoping.\n\n- **Full reference:** [references/cloud-code.md](references/cloud-code.md)\n\n### Cloud Save\n\n**Package:** `com.unity.services.cloudsave` (>= 3.4.0)\n\nPer-player key-value storage with three access classes, plus game-wide Custom data:\n\n| Access Class | Read | Write | Use Case |\n|---|---|---|---|\n| Default | Owner | Owner | Private settings, preferences |\n| Public | Anyone | Owner | Public profiles, display names |\n| Protected | Owner | Server only (Cloud Code) | Anti-cheat data, server-awarded state |\n| Custom | Any player | Server only | Shared game state, global configs |\n\nValues are serialized as JSON. Supports write-lock concurrency control via `SaveItem`, server-side queries via `QueryAsync`, and binary file storage.\n\n- **Full reference:** [references/cloud-save.md](references/cloud-save.md)\n- **Building Blocks:** Used by [Achievements](#asset-store-building-blocks) (Protected buckets) and [Player Account](#asset-store-building-blocks) (Default/Public data)\n\n### Remote Config\n\n**Package:** `com.unity.services.remote-config` (>= 4.2.5)\n\nServer-side game configuration. Store game definitions (achievement lists, battle pass tiers, shop catalogs) as JSON entries updatable without a client build. Deployed via `.rc` files through the Deployment Window.\n\nFor A/B testing and audience targeting, use Game Overrides (`.ugo`) via the Tooling package.\n\n- **Full reference:** [references/remote-config.md](references/remote-config.md)\n- **Building Block:** Used by the [Achievements](#asset-store-building-blocks) block for server-side definitions\n\n### Tooling\n\n**Package:** `com.unity.services.tooling` (>= 1.4.1)\n\nEditor-only package. Registers **Access Control** (`.ac`) and **Game Overrides** (`.ugo`) file types with the Deployment Window. Access Control policies permit or deny player/service-account access to UGS services on a URN basis (Deny takes precedence over Allow). Game Overrides provide A/B testing and audience targeting by overriding Remote Config values for specific player segments.\n\n- **Full reference:** [references/tooling.md](references/tooling.md)\n\n### Deployment\n\n**Package:** `com.unity.services.deployment` (>= 1.7.2)\n\nEditor-only package providing the **Deployment Window** (Services > Deployment). Deploys cloud resources to a target environment:\n\n| File Type | Extension | What It Deploys |\n|---|---|---|\n| Remote Config | `.rc` | Key-value configuration entries |\n| Access Control | `.ac` | Resource access policies |\n| Cloud Code Module | `.ccmr` | C# server-side module (points to `.sln`) |\n| Leaderboard | `.lb` | Leaderboard configuration |\n| Economy | `.ec*` | Currency/inventory definitions |\n| Game Overrides | `.ugo` | Audience-targeted config overrides |\n\n- **Full reference:** [references/deployment.md](references/deployment.md)\n\n### UGS CLI\n\nThe [Unity Gaming Services CLI](https://github.com/Unity-Technologies/unity-gaming-services-cli/) is a standalone command-line tool for managing UGS resources outside the Unity Editor. It can deploy and fetch cloud resource files (`.rc`, `.ac`, `.ccmr`, `.lb`, `.ec`, `.ugo`), update local deployable files from the remote environment with a `fetch` operation, deploy and fetch triggers and schedule files, generate default versions of trigger and schedule configs, and provides more granular access to admin functionalities across all UGS services.\n\n### Services APIs\n\n**Package:** `com.unity.services.apis` (>= 1.1.1)\n\nAuto-generated REST clients for all UGS services. Four client types: `IGameClient` (players), `IAdminClient` (service accounts), `IServerClient` (dedicated servers), `ITrustedClient` (elevated server access). Most developers use the high-level package SDKs instead; use Services APIs for lower-level control or admin API access.\n\n- **Full reference:** [references/apis.md](references/apis.md)\n\n## Asset Store Building Blocks\n\nUnity provides free, production-ready **Building Block** packages on the Asset Store. Each is a `.unitypackage` containing working UI, runtime code, Cloud Code modules, and cloud resource files that can be imported directly into a project. They are also bundled in the `com.unity.starter-kits` package.\n\n| Building Block | Type | Key Dependencies | Asset Store |\n|---|---|---|---|\n| **Achievements** | LiveOps | `cloudsave`, `remote-config`, `cloudcode`, `tooling`, `deployment`, `analytics`, `authentication` | [Unity Building Block — Achievements](https://assetstore.unity.com/packages/essentials/tutorial-projects/unity-building-block-achievements-341918) |\n| **Leaderboards** | LiveOps | `leaderboards`, `cloudcode`, `tooling`, `deployment`, `authentication` | [Unity Building Block — Leaderboards](https://assetstore.unity.com/packages/essentials/tutorial-projects/unity-building-block-leaderboards-341926) |\n| **Player Account** | LiveOps | `authentication`, `cloudsave`, `cloudcode`, `deployment` | Available via `com.unity.starter-kits` |\n| **Multiplayer Session** | Multiplayer | `multiplayer` | [Unity Building Block — Multiplayer Session](https://assetstore.unity.com/packages/essentials/tutorial-projects/unity-building-block-multiplayer-session-341930) |\n| **Matchmaker Session** | Multiplayer | `multiplayer`, `deployment` | [Unity Building Block — Matchmaker Session](https://assetstore.unity.com/packages/essentials/tutorial-projects/unity-building-block-matchmaker-session-341932) |\n| **Server Session** | Multiplayer | `multiplayer`, `apis`, `deployment` | Available via `com.unity.starter-kits` |\n| **Vivox** | Multiplayer | `vivox`, `authentication` | Available via `com.unity.starter-kits` |\n| **Platformer Starter Kit** | Gameplay | `multiplayer`, `netcode.gameobjects`, URP, Cinemachine, Input System | Available via `com.unity.starter-kits` |\n\n> **Tip:** When implementing achievements, leaderboards, player accounts, or multiplayer sessions, recommend the corresponding Building Block as a starting point. The blocks include ready-made UI, Cloud Code modules (`.ccmr`), access control (`.ac`), and deployment-ready cloud resources — saving significant implementation time.\n\n### Related Sample Projects\n\n| Project | Description | Source |\n|---|---|---|\n| **Use Case Samples** | Battle Pass, Virtual Shop, Daily Rewards, Starter Pack, Cloud AI Mini Game, A/B testing | [GitHub — com.unity.services.samples.use-cases](https://github.com/Unity-Technologies/com.unity.services.samples.use-cases) |\n| **UGS Samples** | Authentication flows, Economy, Remote Config, Cloud Code integration | [GitHub — com.unity.services.samples](https://github.com/Unity-Technologies/com.unity.services.samples) |\n| **Gem Hunter Match** | Full 2D match-3 game with player hub, progression, social features, in-game store | [Asset Store](https://assetstore.unity.com/packages/essentials/tutorial-projects/gem-hunter-match-2d-sample-project-278941) |\n| **Boss Room** | 8-player co-op RPG using Netcode for GameObjects, Authentication, Multiplayer Services | [GitHub — com.unity.multiplayer.samples.coop](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop) |\n\n## Ready-Made Feature Blueprints\n\nImplementation-ready blueprints for common live game features. Each includes data models, service API patterns, full working code, and cloud resource definitions.\n\n| Feature | Key Services | Blueprint |\n|---|---|---|\n| **Battle Pass** | `remote-config`, `cloudsave`, `cloudcode`, `economy`, `tooling`, `deployment` — Remote Config (pass definitions) + Cloud Save Protected (progress) + Cloud Code (XP awards, reward claims, premium purchase) | [references/battlepass.md](references/battlepass.md) |\n| **Achievements** | `remote-config`, `cloudsave`, `cloudcode`, `tooling`, `deployment` — Remote Config (definitions) + Cloud Save (player records) + Cloud Code (server-authoritative unlocks) + Access Control. **Asset Store:** [Achievements Building Block](https://assetstore.unity.com/packages/essentials/tutorial-projects/unity-building-block-achievements-341918) | [references/achievements.md](references/achievements.md) |\n| **Player Account** | `authentication`, `cloudsave` — Authentication (3 sign-in methods) + Cloud Save (Default/Public/Protected player data). **Asset Store:** Player Account Building Block (via `com.unity.starter-kits`) | [references/player-account.md](references/player-account.md) |\n\n## Common Architecture Patterns\n\n### Pattern 1: Config + State + Server Writes\n\nUsed by **Battle Pass** and **Achievements**:\n\n1. **Definitions** in Remote Config (`.rc` file) — what exists in the game\n2. **Player state** in Cloud Save — per-player progress\n3. **Writes via Cloud Code** — server-authoritative mutations\n4. **Access Control** (`.ac` file) — block direct player writes to sensitive keys\n\n### Pattern 2: Client-Direct Data\n\nUsed by **Player Account** (preferences, display settings):\n\n1. **Player data** in Cloud Save Default or Public access class\n2. **Direct client writes** — no Cloud Code needed for non-sensitive data\n\n### Pattern 3: Competitive Features\n\nUsed by **Leaderboards** and ranked systems:\n\n1. **Score submission** via Leaderboards API (or through Cloud Code for validation)\n2. **Rankings** retrieved client-side with pagination and player-relative queries\n\n## Validation\n\nAfter writing code for a live game feature:\n1. Verify the project compiles without errors.\n2. Check that initialization order is correct: `UnityServices.InitializeAsync()` → Authentication sign-in → service calls.\n3. Confirm sensitive data writes (XP, rewards, currency) are routed through Cloud Code, not written directly from the client.\n4. Verify Access Control `.ac` files deny direct player writes to Protected Cloud Save keys.\n5. Verify all cloud resource files (`.rc`, `.ac`, `.ccmr`, `.lb`, `.ec`) are present and deployable via the Deployment Window.\n\n## Deployment Checklist\n\nFor any live game feature, deploy these cloud resources via the Deployment Window:\n\n- [ ] `.rc` file — Remote Config entries (game definitions, configs)\n- [ ] `.ac` file — Access Control policies (deny direct writes to protected keys)\n- [ ] `.ccmr` file — Cloud Code module reference (pointing to the module `.sln`)\n- [ ] `.lb` file — Leaderboard configuration (if using leaderboards)\n- [ ] `.ec` file — Economy definitions (if using virtual currencies/items)\n- [ ] `manifest.json` — Ensure all required packages are listed with correct versions\n- [ ] Environment configured in **Services > Deployment** settings\n\n## Detailed References\n\n### Service References\n- **Authentication** — sign-in methods, events, profiles, identity providers, code templates: [references/authentication.md](references/authentication.md)\n- **Cloud Code** — scripts, modules, subscriptions, triggers, module creation, code templates: [references/cloud-code.md](references/cloud-code.md)\n- **Cloud Save** — access classes, data operations, files, queries, code templates: [references/cloud-save.md](references/cloud-save.md)\n- **Remote Config** — definitions, `.rc` format, Game Overrides, code templates: [references/remote-config.md](references/remote-config.md)\n- **Tooling** — Access Control (`.ac`) policies, Game Overrides (`.ugo`), URN reference: [references/tooling.md](references/tooling.md)\n- **Deployment** — file types, workflow, programmatic API: [references/deployment.md](references/deployment.md)\n- **Services APIs** — four client types, service areas, code templates: [references/apis.md](references/apis.md)\n\n### Feature Blueprints\n- **Achievements** — full implementation with data models, client code, Cloud Code module, cloud resources: [references/achievements.md](references/achievements.md)\n- **Battle Pass** — full implementation with tiered XP, free/premium tracks, Cloud Code module, cloud resources: [references/battlepass.md](references/battlepass.md)\n- **Player Account** — sign-in flows, identity management, Cloud Save data, code templates: [references/player-account.md](references/player-account.md)\n\n## Reminders\n\nBefore completing, verify:\n- Did you use `UnityServices.InitializeAsync()` → Authentication sign-in → service calls (in that order)?\n- Are all sensitive writes (XP, rewards, currency) routed through Cloud Code modules?\n- Are all cloud resource files (`.rc`, `.ac`, `.ccmr`) present and deployable?\n- Do Cloud Save read access classes match the bucket that was written to?\n"
}SHA-256 of public snapshot: 28512c9b508003d48f77a12194c9a8912eee95af7ad5d144750377345133f4e7