Creating Space Wars 2D Part 3 Destroying The Bullet
Jun 25, 2023
The player can now shoot as many bullets as they want without the game breaking because it has too many bullets being spawned. An object pooling system would be better but this works for now.
The bullet script is place on the prefab bullet.
Here is the script attached to the bullet. It is a bool that destroys itself when it reaches the end of the screen.