public void AddToPool(PooledObject objectToAdd) { pool.Add(objectToAdd); usedPool.Remove(objectToAdd); objectToAdd.gameObject.SetActive(false); }
public void RemoveFromPool(GameObject objectToRemove) { PooledObject pooledObject = objectToRemove.GetComponent <PooledObject>(); RemoveFromPool(pooledObject); }