How to make GUI object prevent clicking/touching what is under it?

Hello there.

I am making a Turn-based strategy game.

In my scene, I have a grid of tiles.

I have a few buttons(GUITextures) that are meant to make the player decide whether he wants to move, attack, or end his turn.

As the level is larger than the screen, it is possible to move the camera around. However, this also means that the GUITextures will be above the grid tiles.

On each button, I have a OnMouseDown trigger that changes the state of the game.

On each grid tile, I also have a OnMouseDown trigger. However, I obviously do not want these to trigger when the buttons are pressed.

How do I prevent the click event happening on the tile when the button is clicked?

For more suggestions, Google: “unity3d prevent gui.button click pass through”