com.unity.netcode.gameobjects@1.0.0-pre.9
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Additional documentation and release notes are available at [Multiplayer Documentation](https://docs-multiplayer.unity3d.com). ## [1.0.0-pre.9] - 2022-05-10 ### Fixed - Fixed Hosting again after failing to host now works correctly (#1938) - Fixed NetworkManager to cleanup connected client lists after stopping (#1945) - Fixed NetworkHide followed by NetworkShow on the same frame works correctly (#1940)
This commit is contained in:
@@ -765,12 +765,7 @@ namespace Unity.Netcode
|
||||
#endif
|
||||
LocalClientId = ulong.MaxValue;
|
||||
|
||||
PendingClients.Clear();
|
||||
m_ConnectedClients.Clear();
|
||||
m_ConnectedClientsList.Clear();
|
||||
m_ConnectedClientIds.Clear();
|
||||
LocalClient = null;
|
||||
NetworkObject.OrphanChildren.Clear();
|
||||
ClearClients();
|
||||
|
||||
// Create spawn manager instance
|
||||
SpawnManager = new NetworkSpawnManager(this);
|
||||
@@ -862,6 +857,16 @@ namespace Unity.Netcode
|
||||
NetworkConfig.NetworkTransport.Initialize(this);
|
||||
}
|
||||
|
||||
private void ClearClients()
|
||||
{
|
||||
PendingClients.Clear();
|
||||
m_ConnectedClients.Clear();
|
||||
m_ConnectedClientsList.Clear();
|
||||
m_ConnectedClientIds.Clear();
|
||||
LocalClient = null;
|
||||
NetworkObject.OrphanChildren.Clear();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Starts a server
|
||||
/// </summary>
|
||||
@@ -1175,6 +1180,8 @@ namespace Unity.Netcode
|
||||
m_ShuttingDown = true;
|
||||
m_StopProcessingMessages = discardMessageQueue;
|
||||
}
|
||||
|
||||
NetworkConfig.NetworkTransport.OnTransportEvent -= HandleRawTransportPoll;
|
||||
}
|
||||
|
||||
internal void ShutdownInternal()
|
||||
@@ -1299,6 +1306,8 @@ namespace Unity.Netcode
|
||||
IsListening = false;
|
||||
m_ShuttingDown = false;
|
||||
m_StopProcessingMessages = false;
|
||||
|
||||
ClearClients();
|
||||
}
|
||||
|
||||
// INetworkUpdateSystem
|
||||
|
||||
@@ -352,7 +352,10 @@ namespace Unity.Netcode
|
||||
if (NetworkManager != null && NetworkManager.SpawnManager != null &&
|
||||
NetworkManager.SpawnManager.SpawnedObjects.TryGetValue(NetworkObjectId, out var networkObject))
|
||||
{
|
||||
NetworkManager.SpawnManager.OnDespawnObject(networkObject, false);
|
||||
if (this == networkObject)
|
||||
{
|
||||
NetworkManager.SpawnManager.OnDespawnObject(networkObject, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user