physics.raycast troubles with onClick UI Events

OK, I made a Game which uses physics raycast to control objects with colliders in the scene. I also have some UI objects for menu items , mixt with 3d objects arranged as menu items.
My Problem is now, that I use physics raycast as well as the ui Event system. so if i click a UI button, the raycast fires as well, so if i click a button, there is also an interaction with tho collider objects behind it.

What is the best way to handle such situations?

At the moment I have the touch Behavior seperate for each object in my szene, so that sthe raycast is fired for alle objects active - maybe that could cause a problem to.
Is it better to handle all controls in one Event or make events for all Objects that can recive one?.

I have no strict plan how to handle this.

Hi

You can reference to this thread

and this nice video :]

Are you using RaycastAll? How about just using Raycast?