mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkServer - moved RemoveTransportHandlers up
This commit is contained in:
parent
ed8baffc6c
commit
ce7706b5a0
@ -208,6 +208,15 @@ public static void Shutdown()
|
||||
if (aoi != null) aoi.Reset();
|
||||
}
|
||||
|
||||
static void RemoveTransportHandlers()
|
||||
{
|
||||
// -= so that other systems can also hook into it (i.e. statistics)
|
||||
Transport.active.OnServerConnected -= OnTransportConnected;
|
||||
Transport.active.OnServerDataReceived -= OnTransportData;
|
||||
Transport.active.OnServerDisconnected -= OnTransportDisconnected;
|
||||
Transport.active.OnServerError -= OnTransportError;
|
||||
}
|
||||
|
||||
// Note: NetworkClient.DestroyAllClientObjects does the same on client.
|
||||
static void CleanupSpawned()
|
||||
{
|
||||
@ -239,15 +248,6 @@ static void CleanupSpawned()
|
||||
spawned.Clear();
|
||||
}
|
||||
|
||||
static void RemoveTransportHandlers()
|
||||
{
|
||||
// -= so that other systems can also hook into it (i.e. statistics)
|
||||
Transport.active.OnServerConnected -= OnTransportConnected;
|
||||
Transport.active.OnServerDataReceived -= OnTransportData;
|
||||
Transport.active.OnServerDisconnected -= OnTransportDisconnected;
|
||||
Transport.active.OnServerError -= OnTransportError;
|
||||
}
|
||||
|
||||
// calls OnStartClient for all SERVER objects in host mode once.
|
||||
// client doesn't get spawn messages for those, so need to call manually.
|
||||
// Deprecated 2022-12-12
|
||||
|
Loading…
Reference in New Issue
Block a user