mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Added missing Deprecated dates
This commit is contained in:
parent
ff218adc17
commit
b7e6b6b3bc
@ -160,6 +160,7 @@ public override void OnClientAuthenticate()
|
||||
NetworkClient.connection.Send(authRequestMessage);
|
||||
}
|
||||
|
||||
// Deprecated 2021-04-29
|
||||
[Obsolete("Call OnAuthResponseMessage without the NetworkConnection parameter. It always points to NetworkClient.connection anyway.")]
|
||||
public void OnAuthResponseMessage(NetworkConnection conn, AuthResponseMessage msg) => OnAuthResponseMessage(msg);
|
||||
|
||||
|
@ -9,6 +9,7 @@ namespace Mirror
|
||||
/// <para>Any object with this component on it will only be visible to other objects in the same match.</para>
|
||||
/// <para>This would be used to isolate players to their respective matches within a single game server instance. </para>
|
||||
/// </summary>
|
||||
// Deprecated 2021-02-17
|
||||
[Obsolete(NetworkVisibilityObsoleteMessage.Message)]
|
||||
[DisallowMultipleComponent]
|
||||
[AddComponentMenu("Network/NetworkMatchChecker")]
|
||||
|
@ -9,6 +9,7 @@ namespace Mirror
|
||||
/// <para>Any object with this component on it will only be visible to the client that has been assigned authority for it.</para>
|
||||
/// <para>This would be used for spawning a non-player networked object for single client to interact with, e.g. in-game puzzles.</para>
|
||||
/// </summary>
|
||||
// Deprecated 2021-02-17
|
||||
[Obsolete(NetworkVisibilityObsoleteMessage.Message)]
|
||||
[DisallowMultipleComponent]
|
||||
[AddComponentMenu("Network/NetworkOwnerChecker")]
|
||||
|
@ -8,6 +8,7 @@ namespace Mirror
|
||||
/// Component that controls visibility of networked objects for players.
|
||||
/// <para>Any object with this component on it will not be visible to players more than a (configurable) distance away.</para>
|
||||
/// </summary>
|
||||
// Deprecated 2021-02-17
|
||||
[Obsolete(NetworkVisibilityObsoleteMessage.Message)]
|
||||
[AddComponentMenu("Network/NetworkProximityChecker")]
|
||||
[RequireComponent(typeof(NetworkIdentity))]
|
||||
|
@ -10,6 +10,7 @@ namespace Mirror
|
||||
/// <para>Any object with this component on it will only be visible to other objects in the same scene</para>
|
||||
/// <para>This would be used when the server has multiple additive subscenes loaded to isolate players to their respective subscenes</para>
|
||||
/// </summary>
|
||||
// Deprecated 2021-02-17
|
||||
[Obsolete(NetworkVisibilityObsoleteMessage.Message)]
|
||||
[DisallowMultipleComponent]
|
||||
[AddComponentMenu("Network/NetworkSceneChecker")]
|
||||
|
@ -33,6 +33,7 @@ public static class NetworkClient
|
||||
|
||||
/// <summary>The NetworkConnection object that is currently "ready".</summary>
|
||||
// TODO this is from UNET. it's redundant and we should probably obsolete it.
|
||||
// Deprecated 2021-03-10
|
||||
[Obsolete("NetworkClient.readyConnection is redundant. Use NetworkClient.connection and use NetworkClient.ready to check if it's ready.")]
|
||||
public static NetworkConnection readyConnection => ready ? connection : null;
|
||||
|
||||
@ -228,6 +229,7 @@ public static void Disconnect()
|
||||
|
||||
/// <summary>Disconnect host mode.</summary>
|
||||
// this is needed to call DisconnectMessage for the host client too.
|
||||
// Deprecated 2021-05-11
|
||||
[Obsolete("Call NetworkClient.Disconnect() instead. Nobody should use DisconnectLocalServer.")]
|
||||
public static void DisconnectLocalServer()
|
||||
{
|
||||
@ -379,6 +381,7 @@ public static void Send<T>(T message, int channelId = Channels.Reliable)
|
||||
|
||||
// message handlers ////////////////////////////////////////////////////
|
||||
/// <summary>Register a handler for a message type T. Most should require authentication.</summary>
|
||||
// Deprecated 2021-03-13
|
||||
[Obsolete("Use RegisterHandler<T> version without NetworkConnection parameter. It always points to NetworkClient.connection anyway.")]
|
||||
public static void RegisterHandler<T>(Action<NetworkConnection, T> handler, bool requireAuthentication = true)
|
||||
where T : struct, NetworkMessage
|
||||
@ -878,6 +881,7 @@ public static bool Ready()
|
||||
return true;
|
||||
}
|
||||
|
||||
// Deprecated 2021-03-13
|
||||
[Obsolete("NetworkClient.Ready doesn't need a NetworkConnection parameter anymore. It always uses NetworkClient.connection anyway.")]
|
||||
public static bool Ready(NetworkConnection conn) => Ready();
|
||||
|
||||
@ -933,6 +937,7 @@ public static bool AddPlayer()
|
||||
return true;
|
||||
}
|
||||
|
||||
// Deprecated 2021-03-13
|
||||
[Obsolete("NetworkClient.AddPlayer doesn't need a NetworkConnection parameter anymore. It always uses NetworkClient.connection anyway.")]
|
||||
public static bool AddPlayer(NetworkConnection readyConn) => AddPlayer();
|
||||
|
||||
@ -1300,6 +1305,7 @@ internal static void NetworkLateUpdate()
|
||||
}
|
||||
|
||||
// obsolete to not break people's projects. Update was public.
|
||||
// Deprecated 2021-03-02
|
||||
[Obsolete("NetworkClient.Update is now called internally from our custom update loop. No need to call Update manually anymore.")]
|
||||
public static void Update() => NetworkLateUpdate();
|
||||
|
||||
|
@ -825,6 +825,7 @@ internal void OnStopAuthority()
|
||||
// interest management /////////////////////////////////////////////////
|
||||
// obsoletes to still support ProximityChecker while transitioning to
|
||||
// global Interest Management
|
||||
// Deprecated 2021-02-17
|
||||
[Obsolete("Use NetworkServer.RebuildObservers(identity, initialize) instead.")]
|
||||
public void RebuildObservers(bool initialize) => NetworkServer.RebuildObservers(this, initialize);
|
||||
|
||||
|
@ -74,9 +74,11 @@ public class NetworkManager : MonoBehaviour
|
||||
[Tooltip("Maximum number of concurrent connections.")]
|
||||
public int maxConnections = 100;
|
||||
|
||||
// Deprecated 2021-05-10
|
||||
[Obsolete("Transport is responsible for timeouts.")]
|
||||
public bool disconnectInactiveConnections;
|
||||
|
||||
// Deprecated 2021-05-10
|
||||
[Obsolete("Transport is responsible for timeouts. Configure the Transport's timeout setting instead.")]
|
||||
public float disconnectInactiveTimeout = 60f;
|
||||
|
||||
@ -1220,6 +1222,7 @@ public virtual void OnServerAddPlayer(NetworkConnection conn)
|
||||
NetworkServer.AddPlayerForConnection(conn, player);
|
||||
}
|
||||
|
||||
// Deprecated 2021-02-13
|
||||
[Obsolete("OnServerError was removed because it hasn't been used in a long time.")]
|
||||
public virtual void OnServerError(NetworkConnection conn, int errorCode) {}
|
||||
|
||||
@ -1256,6 +1259,7 @@ public virtual void OnClientDisconnect(NetworkConnection conn)
|
||||
StopClient();
|
||||
}
|
||||
|
||||
// Deprecated 2021-02-13
|
||||
[Obsolete("OnClientError was removed because it hasn't been used in a long time.")]
|
||||
public virtual void OnClientError(NetworkConnection conn, int errorCode) {}
|
||||
|
||||
|
@ -14,6 +14,7 @@ public class NetworkManagerHUD : MonoBehaviour
|
||||
{
|
||||
NetworkManager manager;
|
||||
|
||||
// Deprecated 2021-02-24
|
||||
[Obsolete("showGUI will be removed unless someone has a valid use case. Simply use or don't use the HUD component.")]
|
||||
public bool showGUI = true;
|
||||
|
||||
|
@ -40,9 +40,11 @@ public static class NetworkServer
|
||||
// by default, everyone observes everyone
|
||||
public static InterestManagement aoi;
|
||||
|
||||
// Deprecated 2021-05-10
|
||||
[Obsolete("Transport is responsible for timeouts.")]
|
||||
public static bool disconnectInactiveConnections;
|
||||
|
||||
// Deprecated 2021-05-10
|
||||
[Obsolete("Transport is responsible for timeouts. Configure the Transport's timeout setting instead.")]
|
||||
public static float disconnectInactiveTimeout = 60f;
|
||||
|
||||
@ -224,6 +226,8 @@ public static bool NoExternalConnections()
|
||||
return connections.Count == 0 ||
|
||||
(connections.Count == 1 && localConnection != null);
|
||||
}
|
||||
|
||||
// Deprecated 2021-03-07
|
||||
[Obsolete("NoConnections was renamed to NoExternalConnections because that's what it checks for.")]
|
||||
public static bool NoConnections() => NoExternalConnections();
|
||||
|
||||
@ -339,6 +343,7 @@ static void SendToObservers<T>(NetworkIdentity identity, T message, int channelI
|
||||
}
|
||||
|
||||
/// <summary>Send this message to the player only</summary>
|
||||
// Deprecated 2021-03-04
|
||||
[Obsolete("Use identity.connectionToClient.Send() instead! Previously Mirror needed this function internally, but not anymore.")]
|
||||
public static void SendToClientOfPlayer<T>(NetworkIdentity identity, T msg, int channelId = Channels.Reliable)
|
||||
where T : struct, NetworkMessage
|
||||
@ -530,6 +535,7 @@ public static void RegisterHandler<T>(Action<NetworkConnection, T> handler, bool
|
||||
}
|
||||
|
||||
/// <summary>Register a handler for message type T. Most should require authentication.</summary>
|
||||
// Deprecated 2021-02-24
|
||||
[Obsolete("Use RegisterHandler(Action<NetworkConnection, T), requireAuthentication instead.")]
|
||||
public static void RegisterHandler<T>(Action<T> handler, bool requireAuthentication = true)
|
||||
where T : struct, NetworkMessage
|
||||
@ -613,10 +619,11 @@ public static void DisconnectAll()
|
||||
active = false;
|
||||
}
|
||||
|
||||
/// <summary>Disconnect all currently connected clients except the local connection.</summary>
|
||||
// Deprecated 2021-05-11
|
||||
[Obsolete("Call NetworkClient.DisconnectAll() instead")]
|
||||
public static void DisconnectAllExternalConnections() => DisconnectAll();
|
||||
|
||||
// Deprecated 2021-05-11
|
||||
[Obsolete("Call NetworkClient.DisconnectAll() instead")]
|
||||
public static void DisconnectAllConnections() => DisconnectAll();
|
||||
|
||||
@ -1610,6 +1617,7 @@ internal static void NetworkLateUpdate()
|
||||
}
|
||||
|
||||
// obsolete to not break people's projects. Update was public.
|
||||
// Deprecated 2021-03-02
|
||||
[Obsolete("NetworkServer.Update is now called internally from our custom update loop. No need to call Update manually anymore.")]
|
||||
public static void Update() => NetworkLateUpdate();
|
||||
}
|
||||
|
@ -52,12 +52,16 @@ static NetworkTime()
|
||||
/// <summary>Time measurement variance. The higher, the less accurate the time is.</summary>
|
||||
// TODO does this need to be public? user should only need NetworkTime.time
|
||||
public static double timeVariance => _offset.Var;
|
||||
|
||||
// Deprecated 2021-03-10
|
||||
[Obsolete("NetworkTime.timeVar was renamed to timeVariance")]
|
||||
public static double timeVar => timeVariance;
|
||||
|
||||
/// <summary>Time standard deviation. The highe, the less accurate the time is.</summary>
|
||||
// TODO does this need to be public? user should only need NetworkTime.time
|
||||
public static double timeStandardDeviation => Math.Sqrt(timeVariance);
|
||||
|
||||
// Deprecated 2021-03-10
|
||||
[Obsolete("NetworkTime.timeSd was renamed to timeStandardDeviation")]
|
||||
public static double timeSd => timeStandardDeviation;
|
||||
|
||||
@ -70,12 +74,16 @@ static NetworkTime()
|
||||
/// <summary>Round trip time variance. The higher, the less accurate the rtt is.</summary>
|
||||
// TODO does this need to be public? user should only need NetworkTime.time
|
||||
public static double rttVariance => _rtt.Var;
|
||||
|
||||
// Deprecated 2021-03-02
|
||||
[Obsolete("NetworkTime.rttVar was renamed to rttVariance")]
|
||||
public static double rttVar => rttVariance;
|
||||
|
||||
/// <summary>Round trip time standard deviation. The higher, the less accurate the rtt is.</summary>
|
||||
// TODO does this need to be public? user should only need NetworkTime.time
|
||||
public static double rttStandardDeviation => Math.Sqrt(rttVariance);
|
||||
|
||||
// Deprecated 2021-03-02
|
||||
[Obsolete("NetworkTime.rttSd was renamed to rttStandardDeviation")]
|
||||
public static double rttSd => rttStandardDeviation;
|
||||
|
||||
|
@ -19,6 +19,7 @@ public static class NetworkVisibilityObsoleteMessage
|
||||
public const string Message = "Per-NetworkIdentity Interest Management is being replaced by global Interest Management.\n\nWe already converted some components to the new system. For those, please remove Proximity checkers from NetworkIdentity prefabs and add one global InterestManagement component to your NetworkManager instead. If we didn't convert this one yet, then simply wait. See our Benchmark example and our Mirror/Components/InterestManagement for available implementations.\n\nIf you need to port a custom solution, move your code into a new class that inherits from InterestManagement and add one global update method instead of using NetworkBehaviour.Update.\n\nDon't panic. The whole change mostly moved code from NetworkVisibility components into one global place on NetworkManager. Allows for Spatial Hashing which is ~30x faster.\n\n(╯°□°)╯︵ ┻━┻";
|
||||
}
|
||||
|
||||
// Deprecated 2021-02-17
|
||||
[Obsolete(NetworkVisibilityObsoleteMessage.Message)]
|
||||
[DisallowMultipleComponent]
|
||||
public abstract class NetworkVisibility : NetworkBehaviour
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
namespace Mirror
|
||||
{
|
||||
// Deprecated 2021-05-13
|
||||
[HelpURL("https://mirror-networking.gitbook.io/docs/transports/fallback-transport")]
|
||||
[DisallowMultipleComponent]
|
||||
[Obsolete("Fallback Transport will be retired. It was only needed for Apathy/Libuv. Use kcp or Telepathy instead, those run everywhere.")]
|
||||
|
@ -65,6 +65,7 @@ public virtual void ClientConnect(Uri uri)
|
||||
/// <summary>Sends a message to the server over the given channel.</summary>
|
||||
// The ArraySegment is only valid until returning. Copy if needed.
|
||||
// TODO make second version abstract after removing the obsolete version
|
||||
// Deprecated 2021-05-17
|
||||
[Obsolete("Use ClientSend(segment, channelId) instead. channelId is now the last parameter.")]
|
||||
public virtual void ClientSend(int channelId, ArraySegment<byte> segment) {}
|
||||
public virtual void ClientSend(ArraySegment<byte> segment, int channelId)
|
||||
@ -102,6 +103,7 @@ public virtual void ClientSend(ArraySegment<byte> segment, int channelId)
|
||||
|
||||
/// <summary>Send a message to a client over the given channel.</summary>
|
||||
// TODO make second version abstract after removing the obsolete version
|
||||
// Deprecated 2021-05-17
|
||||
[Obsolete("Use ServerSend(connectionId, segment, channelId) instead. channelId is now the last parameter.")]
|
||||
public virtual void ServerSend(int connectionId, int channelId, ArraySegment<byte> segment) {}
|
||||
public virtual void ServerSend(int connectionId, ArraySegment<byte> segment, int channelId)
|
||||
@ -143,7 +145,7 @@ public virtual int GetBatchThreshold(int channelId)
|
||||
#pragma warning restore 618
|
||||
}
|
||||
|
||||
// DEPRECATED 2021-06-17
|
||||
// Deprecated 2021-06-17
|
||||
[Obsolete("GetMaxBatchSize was renamed to GetBatchThreshold.")]
|
||||
public virtual int GetMaxBatchSize(int channelId) =>
|
||||
GetMaxPacketSize(channelId);
|
||||
|
@ -23,6 +23,7 @@ public enum MirrorInvokeType
|
||||
ClientRpc
|
||||
}
|
||||
|
||||
// Deprecated 2021-03-15
|
||||
[Obsolete("Version has never been used, neither by UNET nor by Mirror.")]
|
||||
public enum Version
|
||||
{
|
||||
@ -41,8 +42,11 @@ public static class Channels
|
||||
public const int Reliable = 0; // ordered
|
||||
public const int Unreliable = 1; // unordered
|
||||
|
||||
// Deprecated 2021-03-15
|
||||
[Obsolete("Use Channels.Reliable instead")]
|
||||
public const int DefaultReliable = Reliable;
|
||||
|
||||
// Deprecated 2021-03-15
|
||||
[Obsolete("Use Channels.Unreliable instead")]
|
||||
public const int DefaultUnreliable = Unreliable;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user