From a1866595ac085b49cddef76010677182d7b5da7a Mon Sep 17 00:00:00 2001 From: vis2k Date: Thu, 13 May 2021 12:08:25 +0800 Subject: [PATCH] breaking: obsolete ReplaceHandler --- Assets/Mirror/Runtime/NetworkClient.cs | 4 ++-- Assets/Mirror/Runtime/NetworkServer.cs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Assets/Mirror/Runtime/NetworkClient.cs b/Assets/Mirror/Runtime/NetworkClient.cs index 6afef3e67..01c1c83ce 100644 --- a/Assets/Mirror/Runtime/NetworkClient.cs +++ b/Assets/Mirror/Runtime/NetworkClient.cs @@ -334,7 +334,7 @@ public static void RegisterHandler(Action handler, bool requireAuthenticat } /// Replace a handler for a particular message type. Should require authentication by default. - // TODO does anyone even use that? consider removing + [Obsolete("We are considering to remove ReplaceHandler. If you have a good reason why we should keep it, please let us know.")] public static void ReplaceHandler(Action handler, bool requireAuthentication = true) where T : struct, NetworkMessage { @@ -343,7 +343,7 @@ public static void ReplaceHandler(Action handler, bool } /// Replace a handler for a particular message type. Should require authentication by default. - // TODO does anyone even use that? consider removing + [Obsolete("We are considering to remove ReplaceHandler. If you have a good reason why we should keep it, please let us know.")] public static void ReplaceHandler(Action handler, bool requireAuthentication = true) where T : struct, NetworkMessage { diff --git a/Assets/Mirror/Runtime/NetworkServer.cs b/Assets/Mirror/Runtime/NetworkServer.cs index af6695ab7..7dbbdbbf6 100644 --- a/Assets/Mirror/Runtime/NetworkServer.cs +++ b/Assets/Mirror/Runtime/NetworkServer.cs @@ -469,6 +469,7 @@ public static void RegisterHandler(Action handler, bool requireAuthenticat } /// Replace a handler for message type T. Most should require authentication. + [Obsolete("We are considering to remove ReplaceHandler. If you have a good reason why we should keep it, please let us know.")] public static void ReplaceHandler(Action handler, bool requireAuthentication = true) where T : struct, NetworkMessage { @@ -477,6 +478,7 @@ public static void ReplaceHandler(Action handler, bool } /// Replace a handler for message type T. Most should require authentication. + [Obsolete("We are considering to remove ReplaceHandler. If you have a good reason why we should keep it, please let us know.")] public static void ReplaceHandler(Action handler, bool requireAuthentication = true) where T : struct, NetworkMessage {