mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
breaking!(NetworkManager): Removed obsolete OnServerError / OnClientError
This commit is contained in:
parent
a0605ae651
commit
d45bd661ef
@ -1306,16 +1306,8 @@ public virtual void OnServerAddPlayer(NetworkConnectionToClient conn)
|
|||||||
NetworkServer.AddPlayerForConnection(conn, player);
|
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>
|
/// <summary>Called on server when transport raises an exception. NetworkConnection may be null.</summary>
|
||||||
public virtual void OnServerError(NetworkConnectionToClient conn, TransportError error, string reason)
|
public virtual void OnServerError(NetworkConnectionToClient conn, TransportError error, string reason) {}
|
||||||
{
|
|
||||||
#pragma warning disable CS0618
|
|
||||||
OnServerError(conn, new Exception(reason));
|
|
||||||
#pragma warning restore CS0618
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>Called from ServerChangeScene immediately before SceneManager.LoadSceneAsync is executed</summary>
|
/// <summary>Called from ServerChangeScene immediately before SceneManager.LoadSceneAsync is executed</summary>
|
||||||
public virtual void OnServerChangeScene(string newSceneName) {}
|
public virtual void OnServerChangeScene(string newSceneName) {}
|
||||||
@ -1344,16 +1336,8 @@ public virtual void OnClientConnect()
|
|||||||
/// <summary>Called on clients when disconnected from a server.</summary>
|
/// <summary>Called on clients when disconnected from a server.</summary>
|
||||||
public virtual void OnClientDisconnect() {}
|
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>
|
/// <summary>Called on client when transport raises an exception.</summary>
|
||||||
public virtual void OnClientError(TransportError error, string reason)
|
public virtual void OnClientError(TransportError error, string reason) {}
|
||||||
{
|
|
||||||
#pragma warning disable CS0618
|
|
||||||
OnClientError(new Exception(reason));
|
|
||||||
#pragma warning restore CS0618
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>Called on clients when a servers tells the client it is no longer ready, e.g. when switching scenes.</summary>
|
/// <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() {}
|
public virtual void OnClientNotReady() {}
|
||||||
|
Loading…
Reference in New Issue
Block a user