- Home /
Why does each instance of my Prefab increase drawcalls?
I was under the impression that multiple instances make the same number of drawcalls as the original prefab. I have tested this with a prefab of a unity primitive (cylinder) which has one diffuse texture material - one cylinder prefab creates one draw call, and multiple cylinder instances create one draw call in scene also.
So why then when I place multiple instances of a more complicated prefab, do the draw calls go up with each instance?
The prefab is a building with 4 materials and an animated, parented door with one material. There is a parented trigger box near the door which opens/closes the door and plays a sound during the animation, nothing too complicated. The prefab is dragged into the scene, not instantiated, and apart from the cylinders there are no other objects or scripts in the scene.
Why?
Answer by Eric5h5 · Dec 13, 2011 at 06:15 AM
Dynamic batching can only work with objects that have a small number of triangles. Otherwise the overhead for batching would be greater than the overhead for draw calls, which would make the whole thing pointless. Also don't worry about draw calls too much, unless the number is really large (>1000).