The easiest way to debug is to :
1. Run the game in the editor, not in full screen (uncheck Maximize On Play
button)
2. Select the EventSystem GameObject of your scene
3. In the inspector, open the Preview Window and make it big enough
4. Move your mouse on your screen, and check if the name of your button (or one of its children) appear next to the field pointerEnter
If you can’t see it, possible solutions :
1. Make sure you don’t have any UI elements above your button which could block the raycasts
2. Make sure you have enabled raycasting on the images used by your buttons (check box Raycast Target
in the edito)

3. Make sure you have an Event System in your scene and a GraphicRaycaster attached on a gameobject (on the Canvas usually)
4. Make sure your buttons are interactable (checkbox Interactable
in the editor)
5. Make sure you have a callback attached to your buttons so as to trigger your functions
6. If your canvas is set to Screen Space - Camera
or World space
, make sure you have specified a camera
7. If you have rotated / scaled UI elements, the click may not be detected. In this case, uncheck Ignore Reversed Graphics
in the Graphic Raycaster
component of the canvas, or set the rotation correctly of the element and use a rotated / scaled child image (with Raycast target
disabled) in order to have the desired “graphical result”
8. Check if you have a Canvas Group
attached to the object or one of its parent, and make sure the Interactable
and Blocks Raycasts
are both checked.