Unity3D Draw Call Batching and how it works?

Saharukh Mollah
2 min readSep 13, 2021

--

We all at some point in time had the same question while working on Unity. So what exactly is batching and why it is an important factor in your unity project.

Batch in verb form means to arrange (things) in sets or groups, So here in unity we arrange draw calls in a set of groups for it to render, and these groups are called batches. The number of batches determines the performance of your game or application on the device, especially on mobile devices, it is very important to control the batch count as it can lead to issues like battery draining, heating, and lags.

Unity uses two types of batches

  1. Static Batching
  2. Dynamic Batching

In static batching, the objects are combined using their material reference, this is good for the static objects in the scene that don't move rotate or scale and there are few restrictions in static batching to like I have talked before the batch break issue, If there is a different material reference between a group of static object it leads to batch breaking, another thing every static batch group has a limit of 15k vertices once it is reached unity creates a new batch group.

As the name suggests Dynamic batching is done in unity to all objects sharing the same material with few conditions, like the material should use a single pass and the object should not receive any real-time shadow and the object must be on the same scale as the batch. And the other thing is Each object must be within 300 vertices if the shader is using vertex position, normal and single UV.

How can you Debug Batching?

we can debug using 3 tools.

Stats Console

Profiler

Frame Debugger

We will talk about how to use these in another post.

--

--