- Home /
UI: Mouse events not working
Hey all.
I have created a Canvas object with two buttons as children; neither of them appear to be affected by hovering over them or clicking on them. I expect to see their colour change, but nothing happens.
I have an EventSystem object in my scene, and my Canvas object has a Graphics Raycaster component attached to it, so I'm not sure what's going on.
Any help would be greatly appreciated.
Answer by dppc · Feb 05, 2016 at 02:42 AM
The way I'd go about troubleshooting that is to create a new, empty project, and do these 3 steps:
Select GameObject->UI->Canvas. (This should create a Canvas and an EventSystem.)
Select GameObject->UI->Button. (This should create a Button as a child of the Canvas.)
Run it, click in the game window and see if the button changes color as expected when you hover over it and click on it.
If it does, compare the GameObjects of the working version to those in your project that aren't working until you find the difference(s) in their components.
If it doesn't, that suggests there's an issue with your installation of Unity or the OS.
Your answer
Follow this Question
Related Questions
ScrollRect and IDragHandler on touch devices 1 Answer
How do you highlight/select a button upon mouse enter and keep it moused over upon mouse exit? -2 Answers
An issue related to button in world space canvas. 1 Answer
How to detect which UI Button was triggered via Script (and not actually clicked)? 0 Answers
Button is not being clicked. 1 Answer