Not signed in
Copyright © 2026 Unity Technologies
Within the UIToNetworkManagerBridge.cs there is this script: ========================================= private struct SerializedISessionHandle : INetworkSerializeByMemcpy { public ISession Handle; } ... [Rpc(SendTo.SpecifiedInParams)] private void RequestLinkedClientToPlayerSessionIdRpc(SerializedISessionHandle data, ulong clientId, RpcParams rpcParams) { string playerSessionID = data.Handle.CurrentPlayer.Id; Debug.LogWarning(playerSessionID); // RespondLinkedClientToPlayerSessionIdRpc(clientId, playerSessionID, rpcParams); } ========================================= The fix for this issue would be to only send the information from the ISession implementation via RPC since ISession is not serializable: ========================================= // This will not work as ISession is not serializable nor will it properly serialize its values since many are Actions and other interfaces and internally lists. //SerializedISessionHandle data = new SerializedISessionHandle //{ // Handle = sessionManager.SessionHandle //}; // If all you need is the CurrentPlayer.Id, then just send that: RequestLinkedClientToPlayerSessionIdRpc(sessionManager.SessionHandle.CurrentPlayer.Id,arg2.ClientId, ... [Rpc(SendTo.SpecifiedInParams)] private void RequestLinkedClientToPlayerSessionIdRpc(string playerId, ulong clientId, RpcParams rpcParams) { string playerSessionID = playerId; Debug.LogWarning(playerSessionID); // RespondLinkedClientToPlayerSessionIdRpc(clientId, playerSessionID, rpcParams); } =========================================
Steps to reproduce:
Actual results: A crash occurs when the second client (The virtual player) joins the session
Expected results: Editor/Player does not crash. An error is displayed if referencing another client's ISession object is not permitted
Reproducible with versions: 1.1.0 (6000.0.59f1, 6000.2.10f1), 1.2.0 (6000.3.0b8, 6000.4.0a4)
Tested on (OS): macOS 26.0.1
Notes:
Sign in to see your voted issues