com.unity.services.multiplayer 2.4.0
com.unity.services.multiplayer
Source docsNotes: processedReleased October 8, 2026
Download Options
Direct package downloads captured from Unity's package registry.
Unity Compatibility
Minimum Unity: 6000.0
Package Dependencies
- com.unity.collections (2.6.8)
- com.unity.modules.unitywebrequest (1.0.0)
- com.unity.nuget.newtonsoft-json (3.2.2)
- com.unity.services.authentication (3.8.0)
- com.unity.services.core (1.18.0)
- com.unity.services.deployment (1.7.2)
- com.unity.services.qos (1.5.1)
- com.unity.services.wire (1.5.1)
- com.unity.transport (2.7.4)
Features
- `CancellationToken` overloads of `IMultiplayerService.CreateSessionAsync`, `CreateOrJoinSessionAsync`, `JoinSessionByIdAsync`, `JoinSessionByCodeAsync`, `ReconnectToSessionAsync`, `MatchmakeSessionAsync(QuickJoinOptions, ...)`, and `QuerySessionsAsync`.
- `IMultiplayerService.AddingSessionCancelled` and `SessionObserver.AddingSessionCancelled`, raised when a session creation or joining request is cancelled through the caller's `CancellationToken`. `AddingSessionFailed` is not raised in that case. The event is not raised for `MatchmakeSessionAsync(MatchmakerOptions, ...)`, where cancellation surfaces as `SessionException` with `SessionError.MatchmakerCancelled` and continues to raise `AddingSessionFailed`.
Improvements
- The `CancellationToken` parameter on `CreateSessionAsync`, `CreateOrJoinSessionAsync`, `JoinSessionByIdAsync`, `JoinSessionByCodeAsync`, `ReconnectToSessionAsync`, `MatchmakeSessionAsync(QuickJoinOptions, ...)`, and `QuerySessionsAsync` is now honoured; cancelling throws `OperationCanceledException`. The `MatchmakeSessionAsync(MatchmakerOptions, ...)` overload is unchanged — cancelling still surfaces as `SessionException` with `SessionError.MatchmakerCancelled`.
- Cancelling a session creation or join now also cancels the network start it triggers, and tears down the underlying `NetworkManager` instead of leaving it running.
- The server assembly (`Unity.Services.Multiplayer.Server`) is now always compiled in the editor so server assets can be authored without switching the project to the Dedicated Server build target. It remains excluded from non dedicated server player builds. (Condition: `UNITY_EDITOR || UNITY_SERVER || ENABLE_UCS_SERVER`)
- Raised the minimum `com.unity.services.authentication` dependency to `3.8.0`, the version whose server assembly is available in the editor.
- Updated the `com.unity.services.qos` dependency from 1.4.1 to 1.5.1, which measures QoS over WebTransport on WebGL, so matchmaking tickets and Relay region selection from web players now carry QoS results.
Bug Fixes
- `MatchmakeSessionAsync(MatchmakerOptions, ...)` no longer leaves a cancellation callback registered on the `CancellationToken` after the attempt finishes.
- The Relay and Distributed Authority allocations are now released when stopping the network fails partway through. Previously an exception from the network handler's stop skipped the remaining cleanup, so the allocation remained and the next start could fail with `SessionError.AllocationAlreadyExists`.
- The Matchmaker service now logs the details of a failed request at verbose level instead of as a console error before throwing a `MatchmakerServiceException`. Matchmaking failures that the caller handles, such as those caught as a `SessionException` from `MatchmakeSessionAsync`, no longer produce an uncatchable console error (which, for example, caused passing scenarios to fail under the Unity Test Runner). Define `ENABLE_UNITY_MULTIPLAYER_VERBOSE_LOGGING` to see the request details again.
- Combining conflicting session options, such as `WithRelayNetwork` and `WithDirectNetwork` on the same `SessionOptions`, now throws a `SessionException` with `SessionError.InvalidParameter` and a message naming both conflicting public methods. Previously it threw a bare `System.Exception` whose message referenced an internal type name.
- Starting a session with Netcode for GameObjects when no active `NetworkManager` is present now reports `Cannot start the session: no active NetworkManager was found.` instead of `Cannot start when Singleton is not set.`.
- `SessionException` messages now refer to a session instead of a lobby. The underlying Lobby service is not part of the Sessions API, but its error text was forwarded verbatim, so `JoinSessionByIdAsync` and `ReconnectToSessionAsync` with an unknown identifier reported `lobby not found`, `JoinSessionByCodeAsync` reported `lobby code '...' contains an invalid character ...`, and joining a session the player already belongs to reported `player is already a member of the lobby`. The details of each message, su
