Error in bullet destruction

Destroying bullet in the pool should be done by Destroy(bullet.gameObject);, not Destroy(bullet);

1 Like

This explains why inactive bullet objects were piling up far past the maximum amount specified for the pool. ( I turned fire rate way up for testing and found that the objects were not being destroyed). Destroying “bullet” only destroys the script component, not the gameObject.

Privacy & Terms