diff --git a/Assets/Mirror/Core/NetworkServer.cs b/Assets/Mirror/Core/NetworkServer.cs index 6a81e46b9..45d05aad9 100644 --- a/Assets/Mirror/Core/NetworkServer.cs +++ b/Assets/Mirror/Core/NetworkServer.cs @@ -191,7 +191,9 @@ static void Initialize() static void AddTransportHandlers() { // += so that other systems can also hook into it (i.e. statistics) +#pragma warning disable CS0618 // Type or member is obsolete Transport.active.OnServerConnected += OnTransportConnected; +#pragma warning restore CS0618 // Type or member is obsolete Transport.active.OnServerConnectedWithAddress += OnTransportConnectedWithAddress; Transport.active.OnServerDataReceived += OnTransportData; Transport.active.OnServerDisconnected += OnTransportDisconnected; @@ -264,7 +266,9 @@ public static void Shutdown() static void RemoveTransportHandlers() { // -= so that other systems can also hook into it (i.e. statistics) +#pragma warning disable CS0618 // Type or member is obsolete Transport.active.OnServerConnected -= OnTransportConnected; +#pragma warning restore CS0618 // Type or member is obsolete Transport.active.OnServerConnectedWithAddress -= OnTransportConnectedWithAddress; Transport.active.OnServerDataReceived -= OnTransportData; Transport.active.OnServerDisconnected -= OnTransportDisconnected;