Hi everyone!
(using Unity 2019.2.5.f1 Personal)
I’m seeing this weird(?) behaviour with dynamic batching…
I have a very simple scene with 3 cubes and 1 sphere all sharing the same material.
Depending on the sphere’s position I get
Batches: 3 and Saved by Batching : 2 OR
Batches: 4 and Saved by Batching : 1
One of the batches is due to the default scene. For some reason even with an empty scene (and NO skybox) Unity still makes a draw call. I’ve read that it might be the default plane or that it might be Direct3D,; if anyone knows more about this please share any info. The image below is from an empty scene. As you can see in the red box the result is 1 Batch (2 Tris, 4 Verts) although there are NO objects in the scene:
The image below is a screenshot from my scene with the 3 cubes and 1 sphere. I also include the sphere’s transform as it plays a role in the question. Batching works here as expected. There are 3 Batches (1 for the default scene, 1 for the sphere and 1 for the cubes) and 2 are saved by batching (because the cubes are batched together):
But when the sphere is moved just a bit to the left (it happens with other position changes too) suddenly we get a different batching result. Now we get Batching: 4 and Saved by Batching: 1. Which means that because of that small change in the sphere’s X position, one of the cubes stops being batched with the other two! (There is NO other change in the scene.)
Does anyone have any ideas why this is happening? How does moving the sphere (which was not even part of the batching set) affect the cubes’ batching behaviour???
Thank you!