I have a bunch of overlapping buttons spread across several UI Canvases. The default mouse behaviour only registers hover/click events with one of the overlapping buttons, which is ideal for my project. The problem is the order of which button gets activated, is not tied to the Layer it is on or the Sorting Layer the item is on. I cannot seem to control which button is the top button that gets activated.
Using a RaycastAll() function returns the name of all buttons on any given point, and reflects the problem that for some reason, the buttons are arbitrarily ordered.
How do you control the order in which buttons are registered by the mouse?