OnMouseDown gets both Collider and UI Button

Hi Everyone,
I’m making a 2d game, and I’m implementing some buttons on the game screen.

These are the elements on the screen:

  • Game Objects (let’s call it “Soldier”) in the level, with a sprite rendere and a box2d collider. I’m using a OnMouseDown event to select units on the screen.
  • UI Buttons, that are

The situation I’d like to solve is the following:
If I click on the button and there’s a “Soldier” under it I also select the Soldier.

I’d like to avoid that. If I click on the button I’d just like to use the button and do not select anything below it.

Look at this: