I have a GUI.Box that I slide in from the side of the screen. How can I prevent mouse interaction from going to any objects under it (another GUI.Button for instance, or for that matter an GameObject)?
Tell me more
×
Game Development Stack Exchange is a question and answer site for
professional and independent game developers. It's 100% free, no registration required.
|
This is one of the annoying limitations of the built-in version of Unity's GUI. From most accounts I've seen, you have to do it yourself. Write an input manager that checks locations of mouse clicks and then decides to forward or not the clicks to whatever game systems you want. Alternatively, use a different kind of input system that is based off of colliders. A popular one is NGUI. |
|||||||
|
