- Home /
GUI OnClick() issue...
Hi, I've been making a start menu using only keyboard/gamepad inputs to navigate and submit. So far everything is working great.... except that if I click anywhere on the screen, my buttons will go from highlighted to disabled, and won't become enabled again, effectively breaking the menu. I turned off graphic raycaster on my canvas, switched "OnClick()" in the GUI buttons' inspector window to "off", don't have mouse buttons assigned to inputs and have an event trigger calling methods on each GUI button for my keyboard/pad inputs. I'm totally at a loss as to why the buttons are still responding to a mouse clicks. Any ideas?
Thanks!
Have you tried disabling Raycast Target in the UI components? Buttons should have that field in the Image component.
See this answer :-) I'd recommend extending/creating your own Input $$anonymous$$odule.
http://answers.unity3d.com/questions/1012705/unity-ui-mouse-clicks-clearing-selected-object-in.html
Yes! thank you. Disabling Process$$anonymous$$ouseEvent() looks to be exactly what I need. And yes I did disable raycast target, but the input module is automatically detecting a click no matter what is selected, so didn't work.
Your answer
Follow this Question
Related Questions
Gui list and color 0 Answers
Android Textfield locks out input until esc 2 Answers
Android - touch input causes black screen (except GUI) 1 Answer
Shot Counter Question 2 Answers