com.unity.services.multiplayer 1.2.0-pre.1

com.unity.services.multiplayer

Source docs
Notes: processedReleased August 7, 2025

Browse versions

PreviousNext

Unity Compatibility

Minimum Unity: 2022.3

Features

  • Added support for Host Migration in lobbies:
  • - Added migration operations `GetMigrationDataInfoAsync`, `DownloadMigrationDataAsync` and `UploadMigrationDataAsync`.
  • Added support for Host Migration in sessions:
  • - Added `WithHostMigration` session option to enable automatic netcode snapshots at a configurable interval.
  • - It requires an implementation of `IMigrationDataHandler` which defines how data is generated and applied.
  • - We provide a default migration data handler implementation for Netcode with Entities (Minimum required version 1.7.0)
  • - Added migration data methods to `IHostSession`: `GetHostMigrationDataAsync` and `SetHostMigrationDataAsync` for manual implementations.
  • - Added host migration flow to restart the network on session host changed
  • - Added `SessionHostChanged` and `SessionMigrated` event on `ISession`.
  • - Added optional parameter `preserveRegion` to `RelayOptions` to configure relay reallocation behavior during host migration. Setting this to true saves the region of the first relay allocation and reuses when a relay server is reallocated during host migration.
  • Adding concurrency control settings to the lobby service and to sessions. When enabled, a If-Match header will be sent and an exception will now be thrown in case of conflict for the following operations:
  • - deleting a lobby or session
  • - removing a player from a lobby or session
  • - updating a lobby or session player
  • - updating a lobby or session
  • Added `SessionObserver` class that allows to listen to `ISession` lifecycle for a specific `ISession.Type`.
  • Added `AddingSessionStarted` and `AddingSessionFailed` events inside `IMultiplayerService`.
  • Added overloads for `WithRelayNetwork` and `WithDistributedAuthorityNetwork` to enable manual setting of the underlying network protocol. Defaults left as before: Most platforms keep using DTLS as a default connection and WebGL still defaults to WSS. Use the `RelayNetworkOptions` variant to override the default behavior.
  • Added a `WithDirectNetwork` overload that accepts `DirectNetworkOptions` which takes `ListenIpAddress` and `PublishIpAddress` parameters.
  • Added a `WithDirectNetwork` overload that accepts no arguments, ensuring backward compatibility with the previous `WithDirectNetwork` overload.
  • Added player name integration into multiplayer sessions
  • - `WithPlayerName()` session option for a player to provide their name into a multiplayer session.
  • - `GetPlayerName()` extension method to the session `IReadOnlyPlayer` model to retrieve a player's name.
  • Added `IsServer` property in `ISession` to validate if the local owner of the session handle is a server managing the session.
  • Added `HasPlayer` method in `ISession` to easily validate if a player is in a session.
  • Added `GetPlayer` methods in `ISession` & `IHostSesssion` to easily access a specific player model by player id.
  • The default network handler implementation for netcode for entities will now automatically create client & server worlds if none are available when starting a network connection.
  • Added an Inspector for Matchmaker queue files to allow the edition of the most common properties of the Matchmaker Queue configuration in the editor.
  • Added `Network` property to provide control over the network managed by the Session.
  • - `IHostSession` provides the `IHostSessionNetwork` interface which lets you control the network connection for the session.
  • - `ISession` provides the `IClientSessionNetwork` interface which lets you access the network state and relevant events.
  • - Come in and out of games within the same multiplayer session.
  • - Wait for specific conditions before starting the network connection and your gameplay
  • - Session reaching max players
  • - All players marking themselves as ready through player properties
  • - Etc.
  • Added `Network` property on `ISession` (`IClientSessionNetwork`) & `IHostSession` (`IHostSessionNetwork`) to provide control over the network managed by the Session. Th