Why isn't batching working? 5000+ Drawcalls


I’ve been looking around on-line now for the past week and I cannot find a solution to my problem.

Basically I am instantiating a level made up of 50 x 50 quads. They all have the same material as I’m not modifying the prefab at all during run time.

However I’m getting about 5000+ drawcalls at run time and 0 Saved by batching, which is resulting in a framerate of about 5fps.

What am I missing here?


There’s a bunch of rules related to what you have to do to get batching. Read about them here.

The one that’s probably kicking in here is that objects won’t if their shader employs several passes. Unity’s standard shader uses several passes, so it won’t batch.

Try to select the diffuse shader (Legacy Shaders/Diffuse), as that only uses one pass, and see if you get your batching.

Note also that if you’re using static batching, your batch count (draw call count before Unity 5) wont’ be reduced. Your performance will still be improved a lot more than with dynamic batching, since each of those draw calls will be a lot cheaper. Essentially, all draw calls are not born equal, and draw call count does not tell you the whole picture.