[Solved] Unity 2019.2.13f1 - Curious case of Breaking Batch

After combing through Optimizing Unity UI - Unity Learn and having tried things for hours I am at a loss about disparate results in UI draw call batching. I hope the Unity forum can rise to the challenge and offer a solution.

Case 1 - :heavy_check_mark: Batches as expected
5354265--541008--Shopkeeper545.gif

Case 2 - :heavy_multiplication_x: Breaking batches
5354265--541011--Shopkeeper546.gif

Case 1 has 2 batches. One for the graphics and one for the text despite having a complicated and interwoven hierarchy structure. Perfect!

Case 2 has 8 batches. Four times one for the graphics and four times one for the text despite having a simple hierarchy structure. The hierarchy does not contain any scripts or layout components. Each gameobject containing a graphic only has a Canvas Renderer and Image component. The “Label” gameobject only has a TMP_Text component. The “Names” gameobject only has a Canvas component. None of the four hierarchy groups have inter-overlapping quads or incorrect child order.

I am at a loss. What else can I try to discover the reason for the UI batches to break?

It turned out that one of the recttransform positions had a negative Z value that caused the batch to break. Totally overlooked that for hours. :sweat_smile: