Frequently asked questions
Common questions concerning the Multiplayer Services SDK.
Read time 2 minutesLast updated 4 days ago
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, Matchmaker, and Multiplay, 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 | |
|---|---|---|
| Host | 1. 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 player | 1. 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 - Multiplay:
com.unity.services.multiplay
com.unity.services.multiplayercom.unity.services.multiplayerHow does the session interact with the network?
Starting with version1.2.0-pre.1com.unity.services.multiplayerWithRelayNetworkWithDirectNetworkWithDistributedAuthorityNetworkWithRelayNetworkWithDirectNetworkWithDistributedAuthorityNetworkStartRelayNetworkStartDirectNetworkStartDistributedAuthorityNetworkAre 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 ofTask.DelayHow 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 theENABLE_UNITY_MULTIPLAYER_VERBOSE_LOGGINGWould 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 callsMatchmakeSessionAsync