Receive raycast from uicamera, ignore raycast from main camera?

I have 3d objects on scene, rendered by perspective camera(mainCamera). And I have orthographic camera, needed for drawing ui(uiCamera).
In 3d-world i can tap anywhere, mainCamera gets raycast and something happens. It works ok. And now I have problem with ui: if I tap on ezgui’s button, button gets pressed, but main camera also gets raycast. I want to ignore raycast from main camera.
How can I deal with that? I just want to tap on button, not 3d scene.

Have one or more rectangular area(s) within which you have all your buttons. Check tap position against those areas, if inside ignore else process the tap.