diff --git a/Mirror/Runtime/NetworkScene.cs b/Mirror/Runtime/NetworkScene.cs index 66abd1da8..22c959543 100644 --- a/Mirror/Runtime/NetworkScene.cs +++ b/Mirror/Runtime/NetworkScene.cs @@ -14,7 +14,7 @@ internal class NetworkScene internal void Shutdown() { - ClearLocalObjects(); + NetworkIdentity.spawned.Clear(); ClearSpawners(); } @@ -66,11 +66,6 @@ internal bool RemoveLocalObject(uint netId) return NetworkIdentity.spawned.Remove(netId); } - internal void ClearLocalObjects() - { - NetworkIdentity.spawned.Clear(); - } - internal static void RegisterPrefab(GameObject prefab, Guid newAssetId) { NetworkIdentity view = prefab.GetComponent(); @@ -229,7 +224,7 @@ internal void DestroyAllClientObjects() } } } - ClearLocalObjects(); + NetworkIdentity.spawned.Clear(); } } } diff --git a/Mirror/Runtime/NetworkServer.cs b/Mirror/Runtime/NetworkServer.cs index c89561fca..4e91116f5 100644 --- a/Mirror/Runtime/NetworkServer.cs +++ b/Mirror/Runtime/NetworkServer.cs @@ -1069,11 +1069,6 @@ static void DestroyObject(NetworkIdentity uv, bool destroyServerObject) uv.MarkForReset(); } - public static void ClearLocalObjects() - { - NetworkIdentity.spawned.Clear(); - } - public static void Spawn(GameObject obj) { if (VerifyCanSpawn(obj))