How do you know if your materials are shared (in the context of reducing draw calls)?

I’ve seen dozens of questions related to reducing the number of draw calls. Almost all of them say “make sure you are sharing materials…”. Well, how do you know if you are sharing materials? How do you “share materials”?

In my scene, I’m instantiating multiple copies of two or three different prefabs, each composed of about a dozen low-poly (<50 polys) game objects (each with a mesh) parented together. Many of these meshes share the same material (i.e., I applied Material X to several different meshes, which in turn compose my game objects).

However, when I run the scene in the editor and pull down the graphics stats menu, it shows that I’m not using batching at all. So I try to see if I’m using shared materials, but I don’t know how to do this.

If you are using the same material, and if you make no changes to that material (such as setting color, changing texture, changing the texture offset…), then the materials will be shared. But even with a shared material, there is no guarantee that the calls will be batched. As I recently learned, dynamic batching will only occur if your mesh has fewer than 900 vertex attributes. You can read more here:

Draw Call Batching