How i do render a sprite on top of another and behind a sprite that is behind of the sprite that you want to render on top of?
sprite 1 = is an overlay is in front of everything sprite 2 = buildings, are behind the overlay sprite 3 = stars, are behind the buildings
i want to render sprite 3 on top of sprite 1, but i want to render sprite 3 behind sprite 2 and sprite 2 must render behind sprite 1.
any Ideas :(
Answer by LostOter · Jul 24, 2019 at 06:15 AM
assuming sprite 2 is completely opaque then this can be achieved with a sprite mask. Sprite3 is in front of everything, Sprite1 is behind Sprite3, Sprite2 is behind Sprite1, Sprite2 has a spriteMask component blocking out parts of Sprite3.
Your answer
Follow this Question
Related Questions
How to get the alpha mask shader in Unity 5? 0 Answers
Mask world with UI image? 0 Answers
Sprite Maske and trails/particles? 1 Answer
How Do I create my own custom Sprites in Unity? 1 Answer
SpriteRenderer FlipX too much?! 0 Answers