The Performance Profiler.
DrawCalls need to be measured somehow, and for that we will be using the Performance Profiler, which can be found in the top-menu (Window→ Profiler or Ctrl+7).
The 2nd half of the Profiler screen shows actual data for the graph drawn. Our current scene has every possible optimization turned off, so you can see the difference step by step, while performance increases
The scene is simple: there are 3852 renderers (roads, buildings, props, etc.), each of them with one Unity-Standard material containing an Albedo map. 3854 DrawCalls (or a few objects that are slightly more complex than a cube is way too much for an acceptable framerate.
The following steps help you to start reducing the number of DrawCalls
In our “default” scene, we have switched the rendering path do Deferred since it is geometrically “complex”. The result is a drop from 1005 down to 170 DrawCalls!
Forward rendering tends to work faster and better for small dynamic objects when using Spherical Harmonics (SH). Keep in mind that your LightSource needs to have the RenderMode set to Not Important. We should mention that SH lighting is not local. Point or spot lights tend to look wrong close to some surfaces, SH lighting has very low frequency, which means you can’t have sharp lighting transitions and the transitions only affect the diffuse lighting (too low for specular highlights)
(Note: shadows aren’t visible in the play window since shadows have a min/max rendering distance. Since our camera is quite far away from the center of the scene, the shadow drawing distance is only visible in the editor windows, closer to an object). This can be changed from Edit→ Project Settings→Quality→Shadow Distance; for this scene, it’s been changed from 150 to 1500. This did increase the DrawCalls back to 718, but we’re a long way from finishing the optimizations).
What does this actually mean? With a constant 200 DrawCall rate, you can use the scene on a ~4 year old Android with a rather smooth framerate for start. More in-depth optimization tutorials will arrive soon. Check our blog!.
This tutorial on Unity 3D optimization explains how you can reduce he total number of draw calls in a large scene from 3854 to 260.