From 86d8bc912c25a711990b5eff0e43062887f5cc80 Mon Sep 17 00:00:00 2001 From: MrGadget <9826063+MrGadget1024@users.noreply.github.com> Date: Sat, 20 Jul 2024 12:45:21 -0400 Subject: [PATCH] fix(NetworkServer): Suppress obsolete warnings --- Assets/Mirror/Core/NetworkServer.cs | 4 ++++ 1 file changed, 4 insertions(+) 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;