public void ReturnItem(PoolItem itemToReturn) { if (itemToReturn == null) { return; } itemToReturn.IsActive = false; itemToReturn.OnDespawn(); itemToReturn.transform.SetParent(myTransform); itemToReturn.gameObject.SetActive(false); disabledItems.Add(itemToReturn); }