'Unity GameObject rendering below GameObject lower in the hierarchy
Solution 1:[1]
The square is a sprite that is an object in the World, while the button exists in the UI layer over it.
You have to use UI Image for black square instead of sprite renderer (Right-click on parent -> UI -> Image)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Andriy Marshalek |


