build-live-game

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Build a Live Game With Unity Gaming Services

使用Unity Gaming Services构建实时游戏

UGS Packages

UGS Packages

PackageMin VersionPurpose
com.unity.services.core
1.16.0Initialization, dependency graph
com.unity.services.authentication
3.6.1Player sign-in and identity
com.unity.services.cloudcode
2.10.3Server-authoritative C# modules
com.unity.services.cloudsave
3.4.0Per-player and shared key-value storage
com.unity.remote-config
4.2.5Server-side game configuration
com.unity.services.deployment
1.7.2Deploy cloud resources from Editor
com.unity.services.tooling
1.4.1Access Control and Game Overrides
com.unity.services.apis
1.1.1Generated REST clients for all UGS services
PackageMin Version用途
com.unity.services.core
1.16.0初始化、依赖关系图
com.unity.services.authentication
3.6.1玩家登录与身份验证
com.unity.services.cloudcode
2.10.3服务器权威C#模块
com.unity.services.cloudsave
3.4.0基于玩家和共享的键值存储
com.unity.remote-config
4.2.5服务器端游戏配置
com.unity.services.deployment
1.7.2从编辑器部署云资源
com.unity.services.tooling
1.4.1访问控制与游戏覆盖配置
com.unity.services.apis
1.1.1为所有UGS服务生成的REST客户端

Initialization Pattern

初始化模式

Every UGS game starts the same way.
com.unity.services.core
must initialize first, then the player signs in:
csharp
using Unity.Services.Core;
using Unity.Services.Authentication;

await UnityServices.InitializeAsync();
await AuthenticationService.Instance.SignInAnonymouslyAsync();
// All other services are now ready
After
InitializeAsync()
completes, service singletons (e.g.
CloudSaveService.Instance
,
CloudCodeService.Instance
) are available.
所有UGS游戏的启动流程一致。必须先初始化
com.unity.services.core
,然后玩家登录:
csharp
using Unity.Services.Core;
using Unity.Services.Authentication;

await UnityServices.InitializeAsync();
await AuthenticationService.Instance.SignInAnonymouslyAsync();
// 所有其他服务现已就绪
InitializeAsync()
完成后,服务单例(如
CloudSaveService.Instance
CloudCodeService.Instance
)即可使用。

Package Map

Package映射

Foundation

基础层

PackagePurposeSingleton / Entry Point
CoreInitialization, dependency graph, component registry
UnityServices.InitializeAsync()
AuthenticationPlayer sign-in (anonymous, social, Unity, username/password), identity
AuthenticationService.Instance
Services APIsGenerated REST clients for all UGS services; admin API access via service accountsDirect API classes
Package用途单例/入口点
Core初始化、依赖关系图、组件注册
UnityServices.InitializeAsync()
Authentication玩家登录(匿名、社交平台、Unity账号、用户名/密码)、身份管理
AuthenticationService.Instance
Services APIs为所有UGS服务生成的REST客户端;通过服务账号访问管理API直接调用API类

Player Data and Configuration

玩家数据与配置

PackagePurposeSingleton / Entry Point
Cloud SavePer-player key-value data (Default, Public, Protected) and game-wide Custom data
CloudSaveService.Instance.Data.Player
/
.Data.Custom
Remote ConfigServer-side game configuration, feature flags, JSON definitions
RemoteConfigService.Instance
EconomyVirtual currencies, inventory items, purchases, stores
EconomyService.Instance
Package用途单例/入口点
Cloud Save基于玩家的键值数据(默认、公开、受保护)和全局自定义数据
CloudSaveService.Instance.Data.Player
/
.Data.Custom
Remote Config服务器端游戏配置、功能开关、JSON定义
RemoteConfigService.Instance
Economy虚拟货币、物品库存、购买、商店
EconomyService.Instance

Server Logic and Security

服务器逻辑与安全

PackagePurposeSingleton / Entry Point
Cloud CodeServer-authoritative C# modules for trusted writes and validation
CloudCodeService.Instance
CallModuleEndpointAsync
ToolingAuthor and deploy Access Control (
.ac
) and Game Overrides (
.ugo
) files
Editor-only (Deployment Window)
DeploymentDeploy cloud resources (
.rc
,
.ac
,
.ccmr
,
.lb
, etc.) from the Unity Editor
Editor-only (Services > Deployment)
Package用途单例/入口点
Cloud Code用于可信写入和验证的服务器权威C#模块
CloudCodeService.Instance
CallModuleEndpointAsync
Tooling创建并部署访问控制(
.ac
)和游戏覆盖配置(
.ugo
)文件
仅编辑器可用(部署窗口)
Deployment从Unity编辑器部署云资源(
.rc
.ac
.ccmr
.lb
等)
仅编辑器可用(Services > Deployment)

Social and Competitive

社交与竞技

PackagePurposeSingleton / Entry Point
MultiplayerSessions, matchmaking, lobbies. Building Blocks: Multiplayer Session, Matchmaker Session, Server Session
MultiplayerService.Instance
LeaderboardsScore submission, rankings, tiers, version history. Building Block: Leaderboards
LeaderboardsService.Instance
Package用途单例/入口点
Multiplayer会话、匹配、大厅。构建模块:Multiplayer Session, Matchmaker Session, Server Session
MultiplayerService.Instance
Leaderboards分数提交、排名、层级、版本历史。构建模块:Leaderboards
LeaderboardsService.Instance

Telemetry

遥测

PackagePurposeSingleton / Entry Point
AnalyticsCustom events, standard events, consent management
AnalyticsService.Instance
Package用途单例/入口点
Analytics自定义事件、标准事件、 consent管理
AnalyticsService.Instance

Architecture — How Packages Combine

架构——Package如何组合

                    UnityServices.InitializeAsync()
                     AuthenticationService
                    (sign in → PlayerId)
              ┌───────────────┼───────────────┐
              ▼               ▼               ▼
        Remote Config     Cloud Save      Economy
      (game config,    (player state,  (currencies,
       definitions,     progress,       inventory,
       feature flags)   preferences)    purchases)
              │               │               │
              └───────┬───────┘               │
                      ▼                       │
                 Cloud Code                   │
              (server-authoritative           │
               writes, validation,  ◄─────────┘
               anti-cheat logic)
              ┌───────┼───────┐
              ▼       ▼       ▼
         Cloud Save  Economy  Leaderboards
         (Protected  (server  (score
          writes)    grants)  submission)
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).
                    UnityServices.InitializeAsync()
                     AuthenticationService
                    (登录 → PlayerId)
              ┌───────────────┼───────────────┐
              ▼               ▼               ▼
        Remote Config     Cloud Save      Economy
      (游戏配置,    (玩家状态,  (虚拟货币,
       定义,     进度,       物品库存,
       功能开关)   偏好设置)    购买)
              │               │               │
              └───────┬───────┘               │
                      ▼                       │
                 Cloud Code                   │
              (服务器权威           │
              写入, 验证,  ◄─────────┘
               反作弊逻辑)
              ┌───────┼───────┐
              ▼       ▼       ▼
         Cloud Save  Economy  Leaderboards
         (受保护  (服务器  (分数
         写入)    奖励)  提交)
核心原则: 任何影响游戏完整性的数据(经验值、奖励、货币),都需通过Cloud Code模块进行写入操作。仅非敏感数据(偏好设置、显示设置)适合直接从客户端写入。

Core Services — Quick Reference

核心服务——快速参考

Authentication

Authentication

Package:
com.unity.services.authentication
(>= 3.6.1)
Handles player identity. Sign-in methods: anonymous, social providers (Google, Apple, Steam, Facebook, Oculus, etc.), Unity browser, username/password, and device code flow.
After 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
).
  • Full reference: references/authentication.md
  • Building Block: Player Account — ready-made sign-in UI and identity management
Package:
com.unity.services.authentication
(>= 3.6.1)
处理玩家身份。登录方式包括:匿名登录、社交平台(Google、Apple、Steam、Facebook、Oculus等)、Unity浏览器登录、用户名/密码登录、设备码流登录。
登录后:可获取
PlayerId
PlayerName
。所有登录方式都会触发
SignedIn
事件。
PlayerAccountService
(用于Unity浏览器登录)位于独立程序集
Unity.Services.Authentication.PlayerAccounts
中。
  • 完整参考: references/authentication.md
  • 构建模块: Player Account ——现成的登录UI和身份管理模块

Cloud Code

Cloud Code

Package:
com.unity.services.cloudcode
(>= 2.10.3)
Runs server-side C# modules (.NET 9) for trusted operations. Modules are deployed as
.ccmr
files. The client calls:
csharp
var result = await CloudCodeService.Instance.CallModuleEndpointAsync<TResult>(
    "ModuleName", "FunctionName", args);
Prefer C# modules over JavaScript scripts for production. Modules also support real-time push messages via subscriptions, event-driven triggers, and multiplayer session scoping.
  • Full reference: references/cloud-code.md
Package:
com.unity.services.cloudcode
(>= 2.10.3)
运行服务器端C#模块(.NET 9)以执行可信操作。模块以
.ccmr
文件形式部署。客户端调用方式:
csharp
var result = await CloudCodeService.Instance.CallModuleEndpointAsync<TResult>(
    "ModuleName", "FunctionName", args);
生产环境中优先使用C#模块而非JavaScript脚本。模块还支持通过订阅实现实时推送消息、事件驱动触发器以及多人游戏会话范围限定。
  • 完整参考: references/cloud-code.md

Cloud Save

Cloud Save

Package:
com.unity.services.cloudsave
(>= 3.4.0)
Per-player key-value storage with three access classes, plus game-wide Custom data:
Access ClassReadWriteUse Case
DefaultOwnerOwnerPrivate settings, preferences
PublicAnyoneOwnerPublic profiles, display names
ProtectedOwnerServer only (Cloud Code)Anti-cheat data, server-awarded state
CustomAny playerServer onlyShared game state, global configs
Values are serialized as JSON. Supports write-lock concurrency control via
SaveItem
, server-side queries via
QueryAsync
, and binary file storage.
  • Full reference: references/cloud-save.md
  • Building Blocks: Used by Achievements (Protected buckets) and Player Account (Default/Public data)
Package:
com.unity.services.cloudsave
(>= 3.4.0)
基于玩家的键值存储,包含三种访问类别,加上全局自定义数据:
访问类别读取权限写入权限使用场景
Default所有者所有者私人设置、偏好
Public任何人所有者公开资料、显示名称
Protected所有者仅服务器(Cloud Code)反作弊数据、服务器授予的状态
Custom所有玩家仅服务器共享游戏状态、全局配置
值以JSON格式序列化。支持通过
SaveItem
实现写入锁并发控制、通过
QueryAsync
实现服务器端查询,以及二进制文件存储。
  • 完整参考: references/cloud-save.md
  • 构建模块:Achievements(受保护存储桶)和Player Account(默认/公开数据)使用

Remote Config

Remote Config

Package:
com.unity.services.remote-config
(>= 4.2.5)
Server-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.
For A/B testing and audience targeting, use Game Overrides (
.ugo
) via the Tooling package.
  • Full reference: references/remote-config.md
  • Building Block: Used by the Achievements block for server-side definitions
Package:
com.unity.remote-config
(>= 4.2.5)
服务器端游戏配置。将游戏定义(成就列表、战斗通行证层级、商店目录)存储为JSON条目,无需更新客户端构建即可修改。通过部署窗口以
.rc
文件形式部署。
如需进行A/B测试和受众定向,可通过Tooling包使用游戏覆盖配置(
.ugo
)。
  • 完整参考: references/remote-config.md
  • 构建模块:Achievements模块用于服务器端定义

Tooling

Tooling

Package:
com.unity.services.tooling
(>= 1.4.1)
Editor-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.
  • Full reference: references/tooling.md
Package:
com.unity.services.tooling
(>= 1.4.1)
仅编辑器可用的Package。在部署窗口中注册访问控制
.ac
)和游戏覆盖配置
.ugo
)文件类型。访问控制策略基于URN允许或拒绝玩家/服务账号访问UGS服务(拒绝优先于允许)。游戏覆盖配置通过为特定玩家群体覆盖Remote Config值,实现A/B测试和受众定向。
  • 完整参考: references/tooling.md

Deployment

Deployment

Package:
com.unity.services.deployment
(>= 1.7.2)
Editor-only package providing the Deployment Window (Services > Deployment). Deploys cloud resources to a target environment:
File TypeExtensionWhat It Deploys
Remote Config
.rc
Key-value configuration entries
Access Control
.ac
Resource access policies
Cloud Code Module
.ccmr
C# server-side module (points to
.sln
)
Leaderboard
.lb
Leaderboard configuration
Economy
.ec*
Currency/inventory definitions
Game Overrides
.ugo
Audience-targeted config overrides
  • Full reference: references/deployment.md
Package:
com.unity.services.deployment
(>= 1.7.2)
仅编辑器可用的Package,提供部署窗口(Services > Deployment)。将云资源部署到目标环境:
文件类型扩展名部署内容
Remote Config
.rc
键值配置条目
Access Control
.ac
资源访问策略
Cloud Code Module
.ccmr
C#服务器端模块(指向
.sln
Leaderboard
.lb
排行榜配置
Economy
.ec*
货币/物品库存定义
Game Overrides
.ugo
受众定向配置覆盖
  • 完整参考: references/deployment.md

UGS CLI

UGS CLI

The 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.
Unity Gaming Services CLI是独立的命令行工具,用于在Unity编辑器外管理UGS资源。它可以部署和获取云资源文件(
.rc
.ac
.ccmr
.lb
.ec
.ugo
),通过
fetch
操作从远程环境更新本地可部署文件,部署和获取触发器与调度文件,生成触发器和调度配置的默认版本,并提供对所有UGS服务管理功能的更细粒度访问。

Services APIs

Services APIs

Package:
com.unity.services.apis
(>= 1.1.1)
Auto-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.
  • Full reference: references/apis.md
Package:
com.unity.services.apis
(>= 1.1.1)
为所有UGS服务自动生成的REST客户端。包含四种客户端类型:
IGameClient
(玩家)、
IAdminClient
(服务账号)、
IServerClient
(专用服务器)、
ITrustedClient
(高级服务器访问)。大多数开发者使用高层级Package SDK即可;如需低级控制或访问管理API,可使用Services APIs。
  • 完整参考: references/apis.md

Asset Store Building Blocks

Asset Store构建模块

Unity 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.
Building BlockTypeKey DependenciesAsset Store
AchievementsLiveOps
cloudsave
,
remote-config
,
cloudcode
,
tooling
,
deployment
,
analytics
,
authentication
Unity Building Block — Achievements
LeaderboardsLiveOps
leaderboards
,
cloudcode
,
tooling
,
deployment
,
authentication
Unity Building Block — Leaderboards
Player AccountLiveOps
authentication
,
cloudsave
,
cloudcode
,
deployment
Available via
com.unity.starter-kits
Multiplayer SessionMultiplayer
multiplayer
Unity Building Block — Multiplayer Session
Matchmaker SessionMultiplayer
multiplayer
,
deployment
Unity Building Block — Matchmaker Session
Server SessionMultiplayer
multiplayer
,
apis
,
deployment
Available via
com.unity.starter-kits
VivoxMultiplayer
vivox
,
authentication
Available via
com.unity.starter-kits
Platformer Starter KitGameplay
multiplayer
,
netcode.gameobjects
, URP, Cinemachine, Input System
Available via
com.unity.starter-kits
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.
Unity在Asset Store提供免费、可用于生产环境的构建模块Package。每个模块都是一个
.unitypackage
,包含可用的UI、运行时代码、Cloud Code模块和云资源文件,可直接导入项目。它们也包含在
com.unity.starter-kits
Package中。
构建模块类型核心依赖Asset Store链接
Achievements实时运营
cloudsave
,
remote-config
,
cloudcode
,
tooling
,
deployment
,
analytics
,
authentication
Unity Building Block — Achievements
Leaderboards实时运营
leaderboards
,
cloudcode
,
tooling
,
deployment
,
authentication
Unity Building Block — Leaderboards
Player Account实时运营
authentication
,
cloudsave
,
cloudcode
,
deployment
通过
com.unity.starter-kits
获取
Multiplayer Session多人游戏
multiplayer
Unity Building Block — Multiplayer Session
Matchmaker Session多人游戏
multiplayer
,
deployment
Unity Building Block — Matchmaker Session
Server Session多人游戏
multiplayer
,
apis
,
deployment
通过
com.unity.starter-kits
获取
Vivox多人游戏
vivox
,
authentication
通过
com.unity.starter-kits
获取
Platformer Starter Kit游戏玩法
multiplayer
,
netcode.gameobjects
, URP, Cinemachine, Input System
通过
com.unity.starter-kits
获取
提示: 当实现成就、排行榜、玩家账号或多人游戏会话时,建议以对应的构建模块为起点。这些模块包含现成的UI、Cloud Code模块(
.ccmr
)、访问控制(
.ac
)和可部署的云资源——能大幅节省开发时间。

Related Sample Projects

相关示例项目

ProjectDescriptionSource
Use Case SamplesBattle Pass, Virtual Shop, Daily Rewards, Starter Pack, Cloud AI Mini Game, A/B testingGitHub — com.unity.services.samples.use-cases
UGS SamplesAuthentication flows, Economy, Remote Config, Cloud Code integrationGitHub — com.unity.services.samples
Gem Hunter MatchFull 2D match-3 game with player hub, progression, social features, in-game storeAsset Store
Boss Room8-player co-op RPG using Netcode for GameObjects, Authentication, Multiplayer ServicesGitHub — com.unity.multiplayer.samples.coop
项目描述来源
Use Case Samples战斗通行证、虚拟商店、每日奖励、新手礼包、云端AI小游戏、A/B测试GitHub — com.unity.services.samples.use-cases
UGS Samples登录流程、Economy、Remote Config、Cloud Code集成GitHub — com.unity.services.samples
Gem Hunter Match完整的2D三消游戏,包含玩家中心、进度系统、社交功能、游戏内商店Asset Store
Boss Room8人合作RPG,使用Netcode for GameObjects、Authentication、Multiplayer ServicesGitHub — com.unity.multiplayer.samples.coop

Ready-Made Feature Blueprints

现成功能蓝图

Implementation-ready blueprints for common live game features. Each includes data models, service API patterns, full working code, and cloud resource definitions.
FeatureKey ServicesBlueprint
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
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
references/achievements.md
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
针对常见实时游戏功能的可直接实现蓝图。每个蓝图包含数据模型、服务API模式、完整可用代码和云资源定义。
功能核心服务蓝图链接
Battle Pass
remote-config
,
cloudsave
,
cloudcode
,
economy
,
tooling
,
deployment
— Remote Config(通行证定义)+ Cloud Save受保护存储(进度)+ Cloud Code(经验值奖励、领取奖励、高级购买)
references/battlepass.md
Achievements
remote-config
,
cloudsave
,
cloudcode
,
tooling
,
deployment
— Remote Config(定义)+ Cloud Save(玩家记录)+ Cloud Code(服务器权威解锁)+ 访问控制。Asset Store: Achievements Building Block
references/achievements.md
Player Account
authentication
,
cloudsave
— Authentication(3种登录方式)+ Cloud Save(默认/公开/受保护玩家数据)。Asset Store: Player Account构建模块(通过
com.unity.starter-kits
references/player-account.md

Common Architecture Patterns

常见架构模式

Pattern 1: Config + State + Server Writes

模式1:配置 + 状态 + 服务器写入

Used by Battle Pass and Achievements:
  1. Definitions in Remote Config (
    .rc
    file) — what exists in the game
  2. Player state in Cloud Save — per-player progress
  3. Writes via Cloud Code — server-authoritative mutations
  4. Access Control (
    .ac
    file) — block direct player writes to sensitive keys
适用于战斗通行证成就系统
  1. 定义存储在Remote Config(
    .rc
    文件)——游戏内的内容定义
  2. 玩家状态存储在Cloud Save——每个玩家的进度
  3. 通过Cloud Code写入——服务器权威的变更操作
  4. 访问控制
    .ac
    文件)——阻止玩家直接写入敏感键值

Pattern 2: Client-Direct Data

模式2:客户端直接写入数据

Used by Player Account (preferences, display settings):
  1. Player data in Cloud Save Default or Public access class
  2. Direct client writes — no Cloud Code needed for non-sensitive data
适用于玩家账号(偏好设置、显示设置):
  1. 玩家数据存储在Cloud Save的默认或公开访问类别
  2. 客户端直接写入——非敏感数据无需通过Cloud Code

Pattern 3: Competitive Features

模式3:竞技功能

Used by Leaderboards and ranked systems:
  1. Score submission via Leaderboards API (or through Cloud Code for validation)
  2. Rankings retrieved client-side with pagination and player-relative queries
适用于排行榜和排名系统:
  1. 分数提交通过Leaderboards API(或通过Cloud Code进行验证)
  2. 排名从客户端获取,支持分页和相对玩家查询

Validation

验证

After writing code for a live game feature:
  1. Verify the project compiles without errors.
  2. Check that initialization order is correct:
    UnityServices.InitializeAsync()
    → Authentication sign-in → service calls.
  3. Confirm sensitive data writes (XP, rewards, currency) are routed through Cloud Code, not written directly from the client.
  4. Verify Access Control
    .ac
    files deny direct player writes to Protected Cloud Save keys.
  5. Verify all cloud resource files (
    .rc
    ,
    .ac
    ,
    .ccmr
    ,
    .lb
    ,
    .ec
    ) are present and deployable via the Deployment Window.
完成实时游戏功能代码编写后:
  1. 验证项目编译无错误。
  2. 检查初始化顺序是否正确:
    UnityServices.InitializeAsync()
    → Authentication登录 → 服务调用。
  3. 确认敏感数据写入(经验值、奖励、货币)通过Cloud Code路由,而非直接从客户端写入。
  4. 验证访问控制
    .ac
    文件阻止玩家直接写入Cloud Save的受保护键值。
  5. 验证所有云资源文件(
    .rc
    .ac
    .ccmr
    .lb
    .ec
    )已存在且可通过部署窗口部署。

Deployment Checklist

部署清单

For any live game feature, deploy these cloud resources via the Deployment Window:
  • .rc
    file — Remote Config entries (game definitions, configs)
  • .ac
    file — Access Control policies (deny direct writes to protected keys)
  • .ccmr
    file — Cloud Code module reference (pointing to the module
    .sln
    )
  • .lb
    file — Leaderboard configuration (if using leaderboards)
  • .ec
    file — Economy definitions (if using virtual currencies/items)
  • manifest.json
    — Ensure all required packages are listed with correct versions
  • Environment configured in Services > Deployment settings
对于任何实时游戏功能,需通过部署窗口部署以下云资源:
  • .rc
    文件 — Remote Config条目(游戏定义、配置)
  • .ac
    文件 — 访问控制策略(阻止直接写入受保护键值)
  • .ccmr
    文件 — Cloud Code模块引用(指向模块
    .sln
  • .lb
    文件 — 排行榜配置(如使用排行榜)
  • .ec
    文件 — Economy定义(如使用虚拟货币/物品)
  • manifest.json
    — 确保所有所需Package已列出且版本正确
  • Services > Deployment设置中配置环境

Detailed References

详细参考

Service References

服务参考

  • Authentication — sign-in methods, events, profiles, identity providers, code templates: references/authentication.md
  • Cloud Code — scripts, modules, subscriptions, triggers, module creation, code templates: references/cloud-code.md
  • Cloud Save — access classes, data operations, files, queries, code templates: references/cloud-save.md
  • Remote Config — definitions,
    .rc
    format, Game Overrides, code templates: references/remote-config.md
  • Tooling — Access Control (
    .ac
    ) policies, Game Overrides (
    .ugo
    ), URN reference: references/tooling.md
  • Deployment — file types, workflow, programmatic API: references/deployment.md
  • Services APIs — four client types, service areas, code templates: references/apis.md
  • Authentication — 登录方式、事件、资料、身份提供商、代码模板:references/authentication.md
  • Cloud Code — 脚本、模块、订阅、触发器、模块创建、代码模板:references/cloud-code.md
  • Cloud Save — 访问类别、数据操作、文件、查询、代码模板:references/cloud-save.md
  • Remote Config — 定义、
    .rc
    格式、游戏覆盖配置、代码模板:references/remote-config.md
  • Tooling — 访问控制(
    .ac
    )策略、游戏覆盖配置(
    .ugo
    )、URN参考:references/tooling.md
  • Deployment — 文件类型、工作流、程序化API:references/deployment.md
  • Services APIs — 四种客户端类型、服务领域、代码模板:references/apis.md

Feature Blueprints

功能蓝图

  • Achievements — full implementation with data models, client code, Cloud Code module, cloud resources: references/achievements.md
  • Battle Pass — full implementation with tiered XP, free/premium tracks, Cloud Code module, cloud resources: references/battlepass.md
  • Player Account — sign-in flows, identity management, Cloud Save data, code templates: references/player-account.md
  • Achievements — 完整实现,包含数据模型、客户端代码、Cloud Code模块、云资源:references/achievements.md
  • Battle Pass — 完整实现,包含层级经验值、免费/高级路线、Cloud Code模块、云资源:references/battlepass.md
  • Player Account — 登录流程、身份管理、Cloud Save数据、代码模板:references/player-account.md

Reminders

提醒

Before completing, verify:
  • Did you use
    UnityServices.InitializeAsync()
    → Authentication sign-in → service calls (in that order)?
  • Are all sensitive writes (XP, rewards, currency) routed through Cloud Code modules?
  • Are all cloud resource files (
    .rc
    ,
    .ac
    ,
    .ccmr
    ) present and deployable?
  • Do Cloud Save read access classes match the bucket that was written to?
完成前请验证:
  • 是否按照
    UnityServices.InitializeAsync()
    → Authentication登录 → 服务调用的顺序执行?
  • 所有敏感写入(经验值、奖励、货币)是否通过Cloud Code模块路由?
  • 所有云资源文件(
    .rc
    .ac
    .ccmr
    )是否已存在且可部署?
  • Cloud Save读取访问类别是否与写入的存储桶匹配?