The easiest way to debug is to :
- Run the game in the editor, not in full screen (uncheck Maximize On Play button)
- Select the EventSystem GameObject of your scene
- In the inspector, open the Preview Window and make it big enough
- Move your mouse on your screen, and check if the name of your buttons appear next to the field
pointerEnter
If you can't see it, here are possible solutions :
- Make sure you don't have any UI elements above your button which could block the raycasts
- Make sure you have enabled raycasting on the images used by your buttons (check RaycastTarget)
- Make sure you have an EventSystem in your scene
- Make sure you have a callback attached to your buttons so as to trigger your functions
- Make sure you don't have any CanvasGroup with
BlocksRaycast
or Interactable
set to false
- Make sure you have a GraphicRaycaster attached on a gameobject (on the Canvas usually)