In Unity, I am building a 2D puzzle game, however I need to make sure that certain sprites are rendered on top of other sprites when they are above them.
Here is an example switch (left) and block (right).
I wanted to make sure that the green block appears on top of the green switch when it passes over it, so how do I avoid a situation like this happening?