I have an image component of png on the UI button. It responses even when I clicked its transparent area. How can I fix that?
@zzm88104 I didn’t check but it should work:
- Replace your button Image component “Source Image” field with a new fully transparent image (which size will be your actual clickable area).
- Add to the button (as a child) another game object with an Image component (which will be your real button image). Uncheck its “Raycast Target” (so it won’t be clickable).
- Link this new game object image to the button “Target Graphic” field (see screenshot):