Unity2D sprites overlapping

Hello,
i’m developing a 2D game and have a problem about overlapping prefabs.

I have two prefabs with different sprites; each of them has same Layer and Material (Sprite-Default).

Prefab A has greater Z value than Prefab B. And i also assigned a greater Order in Layer to Prefab B. This should make Prefab B overlay on Prefab A.

Nevertheless, their display behaviour is somekind of random (sometimes one overlays on the other, or vice versa). Also, in the editor Prefab B is always displayed behind (and so hidden by) Prefab A, wheter or not i change their Z values.

Please, does anyone know how i could fix this?

change the layer valvue to background 0 to ground 3 to player 2

Thanks but it didn’t work. Anyway, I finally figured it out. The problem was about Prefab B: it has a child sprite, i had to set its order in layer too.