文档

​
​

Development

User Acquisition

Monetization

工业

Multiplayer Services SDK

All Services

Multiplayer Services SDK

此页面不支持所选语言。
Multiplayer
​
​
Multiplayer Services SDK
  • Overview
  • Get started
    • Install the SDK
    • Migrate to the Multiplayer SDK
    • Billing
  • Use multiplayer sessions
  • Manage sessions
  • Connect players through a relay
  • Networking
  • Matchmaking
  • Monitor and debug sessions
  • Tutorials
  • Reference
  1. Multiplayer Services SDK

Get started

Learn the different methods to add sessions-based multiplayer functionality to your game.
阅读时间2 分钟
最后更新于 16 天前

警告
Attention: The Digital Services Act (DSA) requires Unity to notify our customers’ end users if Unity takes an action that impacts those end users under the DSA. To comply with this requirement, if you use Unity Gaming Services (UGS) products that rely on the Unity Authentication Service, you must integrate the notification API.
For more information on DSA, refer to the Digital Services Act - compliance update.
To make your game compliant, refer to DSA notifications.
The fastest way to get started with Multiplayer Services is to go through the Multiplayer Center. Multiplayer Center suggests packages based on your game needs alongside the Multiplayer Services SDK.
注意
For new multiplayer projects, use the following guides to get started with the Multiplayer Services SDK. For existing projects already using Lobby, Relay, or Matchmaker, refer to the migration guide to start using the Multiplayer Services SDK.
If you don't go through Multiplayer Center, you can install the Multiplayer Services SDK manually. Once installed, you're now ready to begin adding multiplayer elements to your game with sessions. A session represents a group of players that are connected together for a set period of time during a multiplayer game. Players can join sessions through matchmaking, a join code, or by browsing a list of active sessions.
An effective way to learn how to include sessions in your game is through tutorials using either the Netcode for GameObjects or the Netcode for Entities networking libraries. For a simple example, begin with Build a session with Netcode for GameObjects. Next, complete Build a session with Netcode for Entities for a more complex lesson for projects using Data-Oriented Technology Stack (DOTS). Completing these tutorials results in a simple multiplayer game that gives you the foundational knowledge you need to add multiplayer functionality to your games using the Multiplayer Services package.
You can also use the Multiplayer Services Building Blocks to quickly set up multiplayer sessions and matchmaking in your Unity project.
To learn how to interact programmatically with your multiplayer game, refer to Integrating Multiplayer Sessions in your game.
Familiarize yourself with the following key terms as they relate to sessions before you continue:
  • Host: The creator of the session.
  • Client: Anyone else who is in the session but didn't create it.
  • Session property: A piece of information attached to the session.
  • Player property: A piece of information attached to a player in the session.
重要
The Multiplayer Services SDK unites the functionality of the standalone SDKs from the following services:
  • Lobby
  • Matchmaker
  • Relay
The unified SDK simplifies interacting with Unity's Gaming Services, but limitations from the underlying services still apply. For more information about those limitations, refer to this page's Additional resources.

Copyright © 2026 Unity Technologies
法律信息隐私政策CookiesDocumentation Terms of Use请勿出售或分享我的个人信息您的隐私选择(Cookie 设置)

“Unity”、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属公司在美国和其他地方的商标或注册商标(此处查看更多信息)。其他名称或品牌是其各自所有者的商标。

为方便起见,一些页面是机器翻译的,可能包含不准确的内容。如有信息不一致的情况,以英文版本为准。

  • 其他资源
  • Integrate Multiplayer sessions
  • Connect players through a relay
  • Match players

报告此页面的问题