problem with gui and objects in the scene

i have this annoying problem that i dont know how to solve. i have some gui on the screen, and some objects in the scene…sometimes when objects are below the gui and i click on gui, gui responds but also the object below. how to make only gui to respond?

Currently, there is no setting to avoid this. You need to check the mouse position to see if it is in any of the controls’ rectangles and ignore the clicks if so. You can use Rect.Contains for the test.