# SpriteRenderer batching issue, with Z-Position and Order in Layer

I have two sprites (they look the same but with different colors):

I want them to be positioned like on the image above, so there's a feel like blue is standing on the green one. There are two ways to achieve that:

• Blue block with Order in layer 1, Green block with Order in layer 0
• Blue block with lower Z coordinate, so it's physically in front of the green one.

Both of the concepts appear to break batching between these two objects. They're on the same atlas (I've tested it by setting the same Z position and Sorting Order and batching works).

How can I achieve batching here?

The most probable cause is that those sprites are using different Materials: you can't batch such sprites.
• You can, however, achieve different colors with a single material by using a MaterialPropertyBlock – Draco18s May 18 '18 at 22:30
• @Draco18s Do you think that the MaterialPropertyBlock could be useful for sprites' colors? What I mean is that I understand the use of it for 3D, mesh rendered objects, but in the case of the Sprite Renderer component we already have the Color property. – Galandil May 18 '18 at 22:36
• SpriteRenderer inherits from Renderer, which is what supplies SetPropertyBlock, so I assume it works. – Draco18s May 18 '18 at 22:40
• No, I don't mean that, functionally they both work the same, but when dealing with sprites I found that using the Color property is better since we can change/see it directly in the Inspector on a sprite-by-sprite basis without having to look at code. – Galandil May 18 '18 at 22:42