I’m looking for some advice in which cases to use which tool to reduce the amount of draw calls in a rendered scene. I know the basics, but I’d like to dig deeper into the topic, beyond what the documentation provides.
Sources (Unity 5.5)
Static Batching vs. StaticBatchingUtility
Does the utility method do the same thing on GameObjects as settings the Batching Static flag in the inspector? As far as I understand, I can let Unity do everything at build time, but when I have procedurally generated meshes, I can use the utility call to perform batching when my mesh is generated at runtime. Is there any other difference or something to be aware of? Would I have any reason to use StaticBatchingUtility at edit time?
Static Batching vs. manual Mesh.Combine
Given that all meshes already exist at build time, what reasons could I have to prefer manual batching and what downsides would it have? Generally, I would only create a custom batching tool, if it could be run during the build process, so it wouldn’t interfere with level design (just like Unity’s batching works).
- Static Batching requires the same material on renderers within a batch. Does this mean, that multi-material renderers will not be batched at all or does Unity take apart the individual submeshes?
- Creating custom texture atlasses appears to be a solution to provide more batching-potential for any solution. Say, I have created a tool which creates a well-suited compromise of shared materials vs potential memory overhead - would the be any performance difference between combining the meshes manually at edit time vs using the static editor flags?
- Shadow casters are batched differently than regular geometry. Does this mean, Unity handles everything for me or can I achieve better results by manually separating drawn geometry from shadows? This would mean, I’d have to create a copy of each mesh and then batch both groups separately. In the end, I would be able to create larger groups for shadow casters, because all opaque materials can share the same. Is this something Unity already takes advantage of?
- Static Batching already handles occlusion and frustum culling. Manual batches would need to be separated into smaller, local chunks, to provide a similar effect. Is this generally desired or could I possibly want giant shadow batches and smaller geometry chunks in combination to get even more out of it?
- Does it make sense to batch physics mesh colliders together? In theory it would be possible to combine all mesh colliders into a single giant mesh (split it up into groups of 64k). Would it be more efficient to send this big chunk over to physics processing or could it even mean another bottle neck? As far as I know, all static colliders aka “the physics world” need to be build as one big thing anyway, which is why it’s so bad to move a static collider, as it means the whole world needs to be recalculated.
Summary
I’m trying to get a feeling for when it might make sense to create a custom batching solution vs using Unity’s builtin tools; not only from a performance perspective, but also workflow.
Of course, the best thing to do would be to profile the final game and decide upon each permutation. I do honor my own testing, but I believe there a understandable reasons, why it’s not always possible to judge by experiment: When writing a tool for future projects and others to use, I don’t know their specific requirements, but I might want to provide them with a custom solution. Often, measurements are not precise enough so that they can be isolated down to the real cause, e.g. reducing the number of draw calls vs increasing memory might make sense in one level on a specific platform, but in different levels and other platforms and might not work. Add to this a few dozen possible combinations of settings and it becomes very difficult to judge. How do you guys deal with these issues? Just with regular profiling concrete scenes and changes stuff until it gets better or do you create automated tests, which record data and then compare?
PS, I’d be happy to post more of my own findings, if others are interested, hence the elaborated post. ![]()

