ドキュメント

​
​

Development

User Acquisition

Monetization

産業

Multiplayer Services SDK

All Services

Multiplayer Services SDK

このページは選択した言語では使用できません。
Multiplayer
​
​
Multiplayer Services SDK
  • Overview
  • Get started
  • Use multiplayer sessions
  • Manage sessions
  • Connect players through a relay
  • Networking
  • Matchmaking
  • Monitor and debug sessions
  • Tutorials
  • Reference
    • Privacy and consent
    • Support
    • Glossary
    • Frequently asked questions
    • Multiplayer Services Building Blocks
    • Reference
  1. Multiplayer Services SDK

Frequently asked questions

Common questions concerning the Multiplayer Services SDK.
読み終わるまでの所要時間 3 分
最終更新 22日前

What is the purpose of sessions, and how do they relate to the individual services?

The Unity Multiplayer SDK uses Sessions as a comprehensive wrapper to simplify the integration of Unity Gaming Services (UGS) backend features, such as Lobby, Relay, and Matchmaker into multiplayer games. This single interface reduces boilerplate code and standardizes UGS usage, automatically managing features like Lobby heartbeating and, when enabled, the Lobby/Relay integration, allowing developers to focus on unique game features.

How does the Sessions API compare to the direct services API?

The following table compares the high level view for P2P Matchmaking when using Matchmaker, Lobby, and Relay individually versus using the Sessions API.

Direct services APIs

Sessions API equivalent

Host1. Create a Matchmaker ticket
2. Wait for the ticket to find a match
3. Create a lobby
4. Continuously heartbeat the Lobby
5. Create a Relay allocation
6. Add the Relay allocation ID to the Lobby host player
7. Start the NetworkManager
1. Start Matchmaking with Relay
Joining player1. Create a Matchmaker ticket
2. Wait for the ticket to find a match
3. Join the lobby based on the match ID
4. Join the Relay allocation
5. Add the Relay allocation ID to the Lobby player
6. Start NetworkManager
1. Start Matchmaking

Which APIs are deprecated?

The following standalone SDKs are depreacted:
  • Lobby:
    com.unity.services.lobby
  • Relay:
    com.unity.services.relay
  • Matchmaker:
    com.unity.services.matchmaker
The standalone SDKs are deprecated in favor of
com.unity.services.multiplayer
, their functionalities are still accessible within
com.unity.services.multiplayer
. Upgrade to the Multiplayer Services SDK by following the migration guide.

How does the session interact with the network?

Starting with version
1.2.0-pre.1
of
com.unity.services.multiplayer
, you can now choose when to start the network connection in your game flow. This isn't available with Matchmaking.
If you make the host use
WithRelayNetwork
,
WithDirectNetwork
or
WithDistributedAuthorityNetwork
when creating the session, then the network starts automatically as soon as the session is created. Any player joining this same session is pulled into the network connection automatically.
If you don't make the host use
WithRelayNetwork
,
WithDirectNetwork
or
WithDistributedAuthorityNetwork
when creating the session, then no network connection is automatically established. You can then execute any pre-match setup such as choosing a character or waiting for all players to be ready before establishing the network connection. No network is created for any player joining this session at that point. When the host is ready, they can use
StartRelayNetwork
,
StartDirectNetwork
or
StartDistributedAuthorityNetwork
to start the network. Any player joining this session after the network start is pulled into the network connection automatically.

Are there WebGL limitations?

The Multiplayer SDK supports the WebGL target, however, User Datagram Protocol isn't supported for this platform, consequently, Quality of service isn't available, neither is the Datagram Transport Layer Security encryption protocol for Relay. Broader limitations remain, even those unrelated to the Multiplayer SDK, such as restrictions on multithreading including the use of
Task.Delay
.

How is the Sessions API priced?

The Session API wraps multiple services into a single SDK. This includes Relay, Distributed Authority, Lobby, and Matchmaker and therefore contributes to the billing of each of those services.
Refer to the Unity Gaming Services pricing page for complete details.

How do you enable verbose logging?

Set the
ENABLE_UNITY_MULTIPLAYER_VERBOSE_LOGGING
scriptable define under Script Compilation in the Player window of the Untiy Editor.

Would it be possible to matchmake to a session based on the best latency?

Quality of service (QoS) measurements are automatically used in the Sessions API when a player calls
MatchmakeSessionAsync
.

Copyright © 2026 Unity Technologies
法規事項プライバシーポリシークッキーDocumentation Terms of Use私の個人情報を販売または共有しないプライバシーに関する選択 (クッキー設定)

"Unity" の名称、Unity のロゴ、およびその他の Unity の商標は、米国およびその他の国における Unity Technologies またはその関係会社の商標または登録商標です (詳しくはこちら)。その他の名称またはブランドは該当する所有者の商標です。

一部のページは利便性向上のため機械翻訳を使用しており、内容に不正確な表現が含まれる場合があります。内容に齟齬または不一致が生じた場合は、英語版を正本とします。

  • このページ
    • What is the purpose of sessions, and how do they relate to the individual services?

    • How does the Sessions API compare to the direct services API?

    • Which APIs are deprecated?

    • How does the session interact with the network?

    • Are there WebGL limitations?

    • How is the Sessions API priced?

    • How do you enable verbose logging?

    • Would it be possible to matchmake to a session based on the best latency?


このページの問題を報告する