- Home /
The question is answered, right answer was accepted
How to have one GUI button on top of another?
In my game I have the entire screen covered with a button to perform one action, and another button to perform another. The problem is when I click the second button, it always activates the first one because it covers it. I've tried playing around with sorting layers and canvas groups to block raycasts to the larger button, but the most I've accomplished is preventing both buttons from working.
Could you attempt checking to see if a raycast from the mouse click hit both, and if so only trigger the smaller button?
I ayy lmao fixed it by just making 4 invisible buttons ins$$anonymous$$d of one huge one. Probably not ideal but it works
Follow this Question
Related Questions
Buttons not Clickable inside of ScrollView 0 Answers
button.onClick.AddListener(method); NOT Working 1 Answer
Trying to put a 3D object above GUI for Hololens 1 Answer
How to have correct color on imGUI Buttons (as dynamic textures) avoiding multiply effect ? 1 Answer
UI: Mouse events not working 1 Answer