public void SpawnImpact(WeaponData.WeaponType weaponType, Vector3 position) { PooledObject pooledObject = ObjectPoolManager.Instance.GetPooledObject(WeaponData.GetImpactPool(weaponType), AmmoContainer.transform); Impact impact = pooledObject?.GetComponent <Impact>(); if (null == impact) { return; } impact.transform.position = position; StartCoroutine(ImpactCoroutine(pooledObject)); }