I have an interactable ground like a network of hexagon tiles in my project. I am using a new UI system from Unity, UI toolkit, and clicking a UI button makes Raycast go through and interact with the tile below.
I read about some dirty solutions, but I believe there is a better solution than these: https://forum.unity.com/threads/ui-toolkit-and-raycast-block.1034938/#post-8218593
In old UI system was something like EventSystem.current.IsPointerOverGameObject
Can anyone help me?
Is the clicked button working? If not you are probably missing raycast target. Make sure it is set to true on your button's image. If that's not the case you could try using:
in your buttons callback to consume the event and stop further execution.