mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 19:10:32 +00:00
Formatting
This commit is contained in:
parent
a424ee87d1
commit
d92cc65315
@ -121,7 +121,7 @@ void FlushRpcs(NetworkWriter buffer, int channelId)
|
|||||||
{
|
{
|
||||||
if (buffer.Position > 0)
|
if (buffer.Position > 0)
|
||||||
{
|
{
|
||||||
Send(new RpcBufferMessage{ payload = buffer }, channelId);
|
Send(new RpcBufferMessage { payload = buffer }, channelId);
|
||||||
buffer.Position = 0;
|
buffer.Position = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1273,7 +1273,7 @@ void OnClientSceneInternal(SceneMessage msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Called on the server when a new client connects.</summary>
|
/// <summary>Called on the server when a new client connects.</summary>
|
||||||
public virtual void OnServerConnect(NetworkConnectionToClient conn) {}
|
public virtual void OnServerConnect(NetworkConnectionToClient conn) { }
|
||||||
|
|
||||||
/// <summary>Called on the server when a client disconnects.</summary>
|
/// <summary>Called on the server when a client disconnects.</summary>
|
||||||
// Called by NetworkServer.OnTransportDisconnect!
|
// Called by NetworkServer.OnTransportDisconnect!
|
||||||
@ -1314,7 +1314,7 @@ public virtual void OnServerAddPlayer(NetworkConnectionToClient conn)
|
|||||||
|
|
||||||
// Deprecated 2022-05-12
|
// Deprecated 2022-05-12
|
||||||
[Obsolete("OnServerError(conn, Exception) was changed to OnServerError(conn, TransportError, string)")]
|
[Obsolete("OnServerError(conn, Exception) was changed to OnServerError(conn, TransportError, string)")]
|
||||||
public virtual void OnServerError(NetworkConnectionToClient conn, Exception exception) {}
|
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)
|
||||||
{
|
{
|
||||||
@ -1324,10 +1324,10 @@ public virtual void OnServerError(NetworkConnectionToClient conn, TransportError
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <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) { }
|
||||||
|
|
||||||
/// <summary>Called on server after a scene load with ServerChangeScene() is completed.</summary>
|
/// <summary>Called on server after a scene load with ServerChangeScene() is completed.</summary>
|
||||||
public virtual void OnServerSceneChanged(string sceneName) {}
|
public virtual void OnServerSceneChanged(string sceneName) { }
|
||||||
|
|
||||||
/// <summary>Called on the client when connected to a server. By default it sets client as ready and adds a player.</summary>
|
/// <summary>Called on the client when connected to a server. By default it sets client as ready and adds a player.</summary>
|
||||||
public virtual void OnClientConnect()
|
public virtual void OnClientConnect()
|
||||||
@ -1348,11 +1348,11 @@ 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
|
// Deprecated 2022-05-12
|
||||||
[Obsolete("OnClientError(Exception) was changed to OnClientError(TransportError, string)")]
|
[Obsolete("OnClientError(Exception) was changed to OnClientError(TransportError, string)")]
|
||||||
public virtual void OnClientError(Exception exception) {}
|
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)
|
||||||
{
|
{
|
||||||
@ -1362,11 +1362,11 @@ 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>
|
/// <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() { }
|
||||||
|
|
||||||
/// <summary>Called from ClientChangeScene immediately before SceneManager.LoadSceneAsync is executed</summary>
|
/// <summary>Called from ClientChangeScene immediately before SceneManager.LoadSceneAsync is executed</summary>
|
||||||
// customHandling: indicates if scene loading will be handled through overrides
|
// customHandling: indicates if scene loading will be handled through overrides
|
||||||
public virtual void OnClientChangeScene(string newSceneName, SceneOperation sceneOperation, bool customHandling) {}
|
public virtual void OnClientChangeScene(string newSceneName, SceneOperation sceneOperation, bool customHandling) { }
|
||||||
|
|
||||||
/// <summary>Called on clients when a scene has completed loaded, when the scene load was initiated by the server.</summary>
|
/// <summary>Called on clients when a scene has completed loaded, when the scene load was initiated by the server.</summary>
|
||||||
// Scene changes can cause player objects to be destroyed. The default
|
// Scene changes can cause player objects to be destroyed. The default
|
||||||
@ -1391,22 +1391,22 @@ public virtual void OnClientSceneChanged()
|
|||||||
// from all versions, so users only need to implement this one case.
|
// from all versions, so users only need to implement this one case.
|
||||||
|
|
||||||
/// <summary>This is invoked when a host is started.</summary>
|
/// <summary>This is invoked when a host is started.</summary>
|
||||||
public virtual void OnStartHost() {}
|
public virtual void OnStartHost() { }
|
||||||
|
|
||||||
/// <summary>This is invoked when a server is started - including when a host is started.</summary>
|
/// <summary>This is invoked when a server is started - including when a host is started.</summary>
|
||||||
public virtual void OnStartServer() {}
|
public virtual void OnStartServer() { }
|
||||||
|
|
||||||
/// <summary>This is invoked when the client is started.</summary>
|
/// <summary>This is invoked when the client is started.</summary>
|
||||||
public virtual void OnStartClient() {}
|
public virtual void OnStartClient() { }
|
||||||
|
|
||||||
/// <summary>This is called when a server is stopped - including when a host is stopped.</summary>
|
/// <summary>This is called when a server is stopped - including when a host is stopped.</summary>
|
||||||
public virtual void OnStopServer() {}
|
public virtual void OnStopServer() { }
|
||||||
|
|
||||||
/// <summary>This is called when a client is stopped.</summary>
|
/// <summary>This is called when a client is stopped.</summary>
|
||||||
public virtual void OnStopClient() {}
|
public virtual void OnStopClient() { }
|
||||||
|
|
||||||
/// <summary>This is called when a host is stopped.</summary>
|
/// <summary>This is called when a host is stopped.</summary>
|
||||||
public virtual void OnStopHost() {}
|
public virtual void OnStopHost() { }
|
||||||
|
|
||||||
// keep OnGUI even in builds. useful to debug snap interp.
|
// keep OnGUI even in builds. useful to debug snap interp.
|
||||||
void OnGUI()
|
void OnGUI()
|
||||||
|
Loading…
Reference in New Issue
Block a user