From dd4481e82071350b82863df43b29cd4fd28925e0 Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Sun, 29 Aug 2021 16:46:11 +0100 Subject: [PATCH] cleanup qnetworkscene --- QuantumUNET/QNetworkScene.cs | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/QuantumUNET/QNetworkScene.cs b/QuantumUNET/QNetworkScene.cs index 16ff0fe4..8704b830 100644 --- a/QuantumUNET/QNetworkScene.cs +++ b/QuantumUNET/QNetworkScene.cs @@ -8,11 +8,8 @@ namespace QuantumUNET internal class QNetworkScene { internal static Dictionary guidToPrefab { get; } = new Dictionary(); - internal static Dictionary spawnHandlers { get; } = new Dictionary(); - internal static Dictionary unspawnHandlers { get; } = new Dictionary(); - internal Dictionary localObjects { get; } = new Dictionary(); internal void Shutdown() @@ -76,7 +73,8 @@ namespace QuantumUNET return result; } - internal bool RemoveLocalObject(NetworkInstanceId netId) => localObjects.Remove(netId); + internal bool RemoveLocalObject(NetworkInstanceId netId) + => localObjects.Remove(netId); internal bool RemoveLocalObjectAndDestroy(NetworkInstanceId netId) { @@ -95,7 +93,8 @@ namespace QuantumUNET return result; } - internal void ClearLocalObjects() => localObjects.Clear(); + internal void ClearLocalObjects() + => localObjects.Clear(); internal static void RegisterPrefab(GameObject prefab, NetworkHash128 newAssetId) { @@ -272,16 +271,5 @@ namespace QuantumUNET ClearLocalObjects(); } - - internal void DumpAllClientObjects() - { - foreach (var networkInstanceId in localObjects.Keys) - { - var networkIdentity = localObjects[networkInstanceId]; - Debug.Log(networkIdentity != null - ? $"ID:{networkInstanceId} OBJ:{networkIdentity.gameObject} AS:{networkIdentity.AssetId}" - : $"ID:{networkInstanceId} OBJ: null"); - } - } } } \ No newline at end of file