diff --git a/Assets/Mirror/Runtime/NetworkClient.cs b/Assets/Mirror/Runtime/NetworkClient.cs
index 7acc79712..b8a834b96 100644
--- a/Assets/Mirror/Runtime/NetworkClient.cs
+++ b/Assets/Mirror/Runtime/NetworkClient.cs
@@ -22,6 +22,10 @@ public enum ConnectState
///
public class NetworkClient
{
+ ///
+ /// Obsolete: Use NetworkClient directly.
+ /// Singleton isn't needed anymore, all functions are static now. For example: NetworkClient.Send(message) instead of NetworkClient.singleton.Send(message).
+ ///
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use NetworkClient directly. Singleton isn't needed anymore, all functions are static now. For example: NetworkClient.Send(message) instead of NetworkClient.singleton.Send(message).")]
public static NetworkClient singleton = new NetworkClient();
@@ -218,6 +222,9 @@ static void RemoveTransportHandlers()
Transport.activeTransport.OnClientError.RemoveListener(OnError);
}
+ ///
+ /// Obsolete: Use SendMessage instead with no message id instead
+ ///
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use SendMessage instead with no message id instead")]
public static bool Send(short msgType, MessageBase msg)
{
@@ -326,6 +333,9 @@ void GenerateError(byte error)
}
*/
+ ///
+ /// Obsolete: Use NetworkTime.rtt instead
+ ///
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use NetworkTime.rtt instead")]
public static float GetRTT()
{
@@ -364,6 +374,9 @@ internal static void RegisterSystemHandlers(bool localClient)
RegisterHandler(ClientScene.OnSyncEventMessage);
}
+ ///
+ /// Obsolete: Use RegisterHandler instead
+ ///
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use RegisterHandler instead")]
public static void RegisterHandler(int msgType, NetworkMessageDelegate handler)
{
@@ -374,6 +387,9 @@ public static void RegisterHandler(int msgType, NetworkMessageDelegate handler)
handlers[msgType] = handler;
}
+ ///
+ /// Obsolete: Use RegisterHandler instead
+ ///
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use RegisterHandler instead")]
public static void RegisterHandler(MsgType msgType, NetworkMessageDelegate handler)
{
@@ -396,12 +412,18 @@ public static void RegisterHandler(MsgType msgType, NetworkMessageDelegate handl
handlers[msgType] = MessagePacker.MessageHandler(handler);
}
+ ///
+ /// Obsolete: Use UnregisterHandler instead
+ ///
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use UnregisterHandler instead")]
public static void UnregisterHandler(int msgType)
{
handlers.Remove(msgType);
}
+ ///
+ /// Obsolete: Use UnregisterHandler instead
+ ///
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("Use UnregisterHandler instead")]
public static void UnregisterHandler(MsgType msgType)
{
@@ -430,6 +452,9 @@ public static void Shutdown()
connectState = ConnectState.None;
}
+ ///
+ /// Obsolete: Call NetworkClient.Shutdown() instead. There is only one client.
+ ///
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("Call NetworkClient.Shutdown() instead. There is only one client.")]
public static void ShutdownAll()
{