- Home /
Blocking Click through on GUI components
I have looked though the Answers and Forums on how to do this and can't find any concrete answers. The only thing I can assume is that Unity has been completely ignoring this issue for years. Perhaps because they are revamping the GUI stuff for Unity 4. Perhaps because people didn't yell loud enough? I dunno.
You should be able to mark GUI components in a way the doesn't pass clicks through to any other objects.
You shouldn't have to do special things in other scripts to detect whether the click was on a GUI component at the time.
You shouldn't have to create dead zones in your game for GUI components to live.
You shouldn't have to make entire windows draggable.
You should just be able to build your GUI components set your no click through option and forget about it.
Am I missing something? Is there a way to actually do this? Thanks!
i completely agree with you!
Am I missing something? - No
Is there a way to actually do this? - No
Here's a full analysis from long ago ! .........
http://answers.unity3d.com/questions/267597/capturing-events-in-unity.html
It's sad but you're not missing anything and Unity GUI have many other issues, for example the excessive draw calls. To address all this issues, you have to replace Unity GUI for a GUI framework, like EZGUI or NGUI.
+1 Just don't use Unity GUI.
In my opinion, NGUI is amazing. And you can try for free. It's currently discounted at 49$, but at 100 it's still well worth it.
TBC ....... unity's GUI (the two they offer) is crap and you shouldn't use it, exactly as Greg says. nobody uses it and nor should the questioner! :)
But the problem is deeper - unity just does not have an "event" model. As Bunny explains on the linked question, he's right, this is a Choice, and it's not necessarily a bad thing .. but it's how it is. It makes some things very easy and some things strange if you're used to program$$anonymous$$g a "normal" system like osx.
BTW yes NGUI is worth at least $500. One of the things that makes me sick about this planet is the silly low prices set on the Asset Store.
If it was $500, that product for example could afford tremendously more develeopment.