breaking!(NetworkManager): Removed obsolete OnServerError / OnClientError

This commit is contained in:
MrGadget1024 2023-03-06 08:49:37 -05:00
parent a0605ae651
commit d45bd661ef

View File

@ -1306,16 +1306,8 @@ public virtual void OnServerAddPlayer(NetworkConnectionToClient conn)
NetworkServer.AddPlayerForConnection(conn, player);
}
// Deprecated 2022-05-12
[Obsolete("OnServerError(conn, Exception) was changed to OnServerError(conn, TransportError, string)")]
public virtual void OnServerError(NetworkConnectionToClient conn, Exception exception) {}
/// <summary>Called on server when transport raises an exception. NetworkConnection may be null.</summary>
public virtual void OnServerError(NetworkConnectionToClient conn, TransportError error, string reason)
{
#pragma warning disable CS0618
OnServerError(conn, new Exception(reason));
#pragma warning restore CS0618
}
public virtual void OnServerError(NetworkConnectionToClient conn, TransportError error, string reason) {}
/// <summary>Called from ServerChangeScene immediately before SceneManager.LoadSceneAsync is executed</summary>
public virtual void OnServerChangeScene(string newSceneName) {}
@ -1344,16 +1336,8 @@ public virtual void OnClientConnect()
/// <summary>Called on clients when disconnected from a server.</summary>
public virtual void OnClientDisconnect() {}
// Deprecated 2022-05-12
[Obsolete("OnClientError(Exception) was changed to OnClientError(TransportError, string)")]
public virtual void OnClientError(Exception exception) {}
/// <summary>Called on client when transport raises an exception.</summary>
public virtual void OnClientError(TransportError error, string reason)
{
#pragma warning disable CS0618
OnClientError(new Exception(reason));
#pragma warning restore CS0618
}
public virtual void OnClientError(TransportError error, string reason) {}
/// <summary>Called on clients when a servers tells the client it is no longer ready, e.g. when switching scenes.</summary>
public virtual void OnClientNotReady() {}