Quantcast
Viewing all articles
Browse latest Browse all 6

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?

Viewing all articles
Browse latest Browse all 6

Trending Articles