I have a 2D game with the play field on the default canvas (z = 0.5). The UI buttons are on another canvas on z = 0.0. I want to prevent mouse clicks from going through to the UI buttons after the player has won the game, so I cover the entire screen with a UI Text (enabled when the player has won the game)
I tried
- Adding a UI Text on the default canvas.
- Adding a UI Text on the UI buttons canvas.
- Adding another canvas (z = -0.5) and make the UI Text a child object to this canvas.
For all 3 options, the Raycast Target option is checked. However, the UI buttons are still clickable.
Appreciate any advice on this issue.
Thank you!