I'm noticing that when I hold down the fire key, my rapid fire machine gun causes the draw calls to go from 12 to 94. Each bullet is an instantiated prefab right now with a
Ideally, since I'm cloning a prefab with an identical material, my draw calls should go from 12 to 13 when I hold the fire button.
Should I create a global
Every individual object is at least one draw call whether it shares a material or not. (Except on Unity iPhone, with some restrictions, but even that has overhead compared to one real draw call to begin with.) Generally speaking, for a rapid-fire gun, you wouldn't really generate hundreds of individual objects, because that's a lot of resources to devote to something you don't even see in a lot of detail. Instead you do a raycast or similar, and make an effect that simulates lots of bullets, such as (indeed) a particle system.
answered Apr 27 '10 at 04:23 AM