Files
nexus/wiki/entities/UnityGamingServices.md
2026-04-26 12:02:53 +08:00

43 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Unity Gaming Services"
type: entity
tags: [unity, cloud-services, platform]
sources: [unity-multiplayer-engineer]
last_updated: 2026-04-26
---
## Aliases
- UGS
- Unity Cloud Services
## Type
Unity 云服务平台
## Definition
Unity Gaming ServicesUGS是 Unity 官方提供的云服务集合,包含身份认证、匹配大厅、流量中继、分析、远程配置等多人游戏所需的云端组件。
## Core Services for Multiplayer
| 服务 | 用途 |
|------|------|
| **Relay** | 流量中继,解决 NAT 穿透,保护主机 IP |
| **Lobby** | 匹配大厅,存储元数据(房间名、地图等) |
| **Authentication** | 匿名登录,为 Relay/Lobby 提供玩家身份 |
| **Multiplay** | 专业服务器托管(付费服务) |
## Quick Start
```csharp
await UnityServices.InitializeAsync();
await AuthenticationService.Instance.SignInAnonymouslyAsync();
```
## Related Concepts
- [[UnityRelay]]: UGS 核心多人服务
- [[UnityLobby]]: UGS 核心多人服务
- [[ServerAuthority]]: UGS 服务支持服务器权威架构
## Related Entities
- [[UnityMultiplayerEngineer]]: 使用 UGS 的专家
- [[UnityTransport]]: 集成 UGS 服务的传输层
- [[UnityGamingServices]]: 即本条目