mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
DestroyAllClientObjects/CleanupNetworkIdentities: add comments
This commit is contained in:
parent
4d971c1e57
commit
6447871d8f
@ -671,6 +671,8 @@ static bool InvokeUnSpawnHandler(Guid assetId, GameObject obj)
|
|||||||
/// Destroys all networked objects on the client.
|
/// Destroys all networked objects on the client.
|
||||||
/// <para>This can be used to clean up when a network connection is closed.</para>
|
/// <para>This can be used to clean up when a network connection is closed.</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
//
|
||||||
|
// Note: NetworkServer.CleanupNetworkIdentities does the same on server.
|
||||||
public static void DestroyAllClientObjects()
|
public static void DestroyAllClientObjects()
|
||||||
{
|
{
|
||||||
// user can modify spawned lists which causes InvalidOperationException
|
// user can modify spawned lists which causes InvalidOperationException
|
||||||
|
@ -132,6 +132,7 @@ public static void Shutdown()
|
|||||||
NetworkIdentity.ResetNextNetworkId();
|
NetworkIdentity.ResetNextNetworkId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Note: ClientScene.DestroyAllClientObjects does the same on client.
|
||||||
static void CleanupNetworkIdentities()
|
static void CleanupNetworkIdentities()
|
||||||
{
|
{
|
||||||
foreach (NetworkIdentity identity in NetworkIdentity.spawned.Values)
|
foreach (NetworkIdentity identity in NetworkIdentity.spawned.Values)
|
||||||
|
Loading…
Reference in New Issue
Block a user