Integrate multiplayer sessions
Learn how multiplayer sessions manage connected players, session ownership, and game state in Unity Multiplayer Services.
Read time 2 minutesLast updated 10 days ago
Implement multiplayer functionality in your games using sessions, a unified system that manages player connections and interactions across multiple Unity Gaming Services.
Sessions provide an abstraction layer for managing multiplayer game states, including initial player connections and gameplay interactions, and automatically handle complex multiplayer operations such as host election, players joining or leaving, and network connection establishment.
Beginning with Unity 6.0 LTS, developers can use session operations to create their multiplayer experiences. Instead of having to manually coordinate between the SDKs for Lobby, Matchmaker, and Relay, the Multiplayer Services (MPS) SDK merges the functionality previously spread across these individual services' SDKs into a unified API centered around sessions. For example, when creating a session, the MPS SDK automatically handles lobby creation, relay allocation, and manages the Netcode connection. Similarly, while joining a session, the MPS SDK manages lobby joining, and Netcode connection establishment. This combined approach maintains all the capabilities of the underlying Unity Gaming Services (UGS) Multiplayer services while reducing implementation complexity.