From ac3007fd1bd48baef39f44e54dbcf39b7ff741fe Mon Sep 17 00:00:00 2001 From: MrGadget <9826063+MrGadget1024@users.noreply.github.com> Date: Thu, 11 Jul 2024 09:32:02 -0400 Subject: [PATCH] fix(MultiplexTransport) Implement OnServerConnectedWithAddress --- Assets/Mirror/Transports/Multiplex/MultiplexTransport.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Assets/Mirror/Transports/Multiplex/MultiplexTransport.cs b/Assets/Mirror/Transports/Multiplex/MultiplexTransport.cs index d567115f8..b4c979d44 100644 --- a/Assets/Mirror/Transports/Multiplex/MultiplexTransport.cs +++ b/Assets/Mirror/Transports/Multiplex/MultiplexTransport.cs @@ -268,6 +268,13 @@ void AddServerCallbacks() OnServerConnected.Invoke(multiplexedId); }); + transport.OnServerConnectedWithAddress = (originalConnectionId, address) => + { + // invoke Multiplex event with multiplexed connectionId + int multiplexedId = AddToLookup(originalConnectionId, transportIndex); + OnServerConnectedWithAddress.Invoke(multiplexedId, address); + }; + transport.OnServerDataReceived = (originalConnectionId, data, channel) => { // invoke Multiplex event with multiplexed connectionId