|
Hi, in my game there is a panel in the corner that has buttons in it, but when I click the button it registers in the world, creating an object, can I stop this?
(comments are locked)
|
|
You're gonna want to take a look at the HitTest method. You use it like this: thanks bro! helped a lot.
May 04 '10 at 10:17 AM
Jason Hamilton
That works for GUIText and GUITexture, but what about buttons and such created with UnityGUI?
May 06 '10 at 06:24 AM
yoyo
It should work for any GUI element.
May 06 '10 at 08:11 PM
qJake
It works with any GUIElement, but the new UnityGUI system doesn't use those, and doesn't even require a GUILayer to work. You call GUI.Button every frame to create a button, for example.
May 07 '10 at 04:31 PM
Pekuja
Any update on this in the last 10 months?
Feb 25 '11 at 07:32 PM
Shadyfella13
(comments are locked)
|
|
i made it through GUIUtility.hotControl Thanks for the suggestion, you made my day!
Dec 19 '12 at 06:27 PM
Kehos
(comments are locked)
|

Anyone found a solution for this yet?
cross-reference
http://answers.unity3d.com/questions/16774/preventing-mouse-clicks-from-passing-through-gui-c.html
http://answers.unity3d.com/questions/7531/if-i-have-a-button-over-my-3d-world-how-can-i-dete.html