From c7667f0b0f57dd623594e6380430488dc122aed6 Mon Sep 17 00:00:00 2001 From: LPLafontaineB Date: Mon, 24 Apr 2023 16:16:39 -0400 Subject: [PATCH] removing unneeded method --- .../Infrastructure/NetworkObjectPool.cs | 26 +++++-------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/Assets/Scripts/Infrastructure/NetworkObjectPool.cs b/Assets/Scripts/Infrastructure/NetworkObjectPool.cs index ea3dcf59a..2dede95bd 100644 --- a/Assets/Scripts/Infrastructure/NetworkObjectPool.cs +++ b/Assets/Scripts/Infrastructure/NetworkObjectPool.cs @@ -86,7 +86,13 @@ public void OnValidate() /// public NetworkObject GetNetworkObject(GameObject prefab, Vector3 position, Quaternion rotation) { - return GetNetworkObjectInternal(prefab, position, rotation); + var networkObject = m_PooledObjects[prefab].Get(); + + var noTransform = networkObject.transform; + noTransform.position = position; + noTransform.rotation = rotation; + + return networkObject; } /// @@ -141,24 +147,6 @@ void ActionOnDestroy(NetworkObject networkObject) // Register Netcode Spawn handlers NetworkManager.Singleton.PrefabHandler.AddHandler(prefab, new PooledPrefabInstanceHandler(prefab, this)); } - - /// - /// This matches the signature of - /// - /// - /// - /// - /// - NetworkObject GetNetworkObjectInternal(GameObject prefab, Vector3 position, Quaternion rotation) - { - var networkObject = m_PooledObjects[prefab].Get(); - - var noTransform = networkObject.transform; - noTransform.position = position; - noTransform.rotation = rotation; - - return networkObject; - } } [Serializable]