The button has no image, a button component and a script written by me (ButtonClickHandler). The script just overrides OnPointerDown, OnPointerUp etc
The image just has an image:
The problem: When I click on the image, the click works. But when I click anywhere on the big button area outside the image (the white triangle) the click is not registered.
Anyone knows why only the image is clickable and NOT the whole button area?
You need a “raycast target” to catch the click. You can see the Image component has a bool “Raycast Target” which determines if it intercepts mouse or touch input.
Not sure what version of Unity you are using, my version has settings for “Raycast Padding” on the Image component that lets you increase the size of the clickable area.
If you don’t have that option, you could either make your own component that implements Graphic.raycastTarget or just put an image component on the bigger button area and set its opacity to 0. If you tick “Cull Transparent Mesh” you should still be able to click the invisible image but avoid overdraw.