Unity 3d Project -

When you click "New Project," Unity offers several templates:

Do not use Instantiate() and Destroy() on bullets or enemy projectiles. Instantiation is expensive and causes Garbage Collection (GC) stutters. Create an Object Pool . At the start, spawn 20 bullets and disable them. When you need a bullet, find a disabled one, enable it, and move it. When it expires, disable it again. This eliminates 99% of runtime allocations. unity 3d project