From 688ec28d5d75ba7b3c37ae3bb2befb5d776f25a0 Mon Sep 17 00:00:00 2001 From: vis2k Date: Sun, 7 Mar 2021 15:22:00 +0800 Subject: [PATCH] more sorting --- Assets/Mirror/Runtime/NetworkServer.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Assets/Mirror/Runtime/NetworkServer.cs b/Assets/Mirror/Runtime/NetworkServer.cs index c8d12fd3b..089f478f1 100644 --- a/Assets/Mirror/Runtime/NetworkServer.cs +++ b/Assets/Mirror/Runtime/NetworkServer.cs @@ -81,6 +81,14 @@ static void Initialize() AddTransportHandlers(); } + static void AddTransportHandlers() + { + Transport.activeTransport.OnServerConnected = OnConnected; + Transport.activeTransport.OnServerDataReceived = OnDataReceived; + Transport.activeTransport.OnServerDisconnected = OnDisconnected; + Transport.activeTransport.OnServerError = OnError; + } + public static void ActivateHostScene() { foreach (NetworkIdentity identity in NetworkIdentity.spawned.Values) @@ -339,14 +347,6 @@ public static void SendToClientOfPlayer(NetworkIdentity identity, T msg, int } // transport events //////////////////////////////////////////////////// - static void AddTransportHandlers() - { - Transport.activeTransport.OnServerConnected = OnConnected; - Transport.activeTransport.OnServerDataReceived = OnDataReceived; - Transport.activeTransport.OnServerDisconnected = OnDisconnected; - Transport.activeTransport.OnServerError = OnError; - } - static void OnConnected(int connectionId) { // Debug.Log("Server accepted client:" + connectionId);