We’ve had this issue too on several occasions in one of our projects. Some things we noticed
the way you order objects in the hierarchy is very important. Text elements on top of buttons is a no-no (even when there is no visible text on top of the button)
something is definitely going wrong when you have screensize rendertexures in combination with ui elements. They shouldn’t interfere with mouse events but they do (ie a text element on a section that is used in as rendertexture can interfere with something that is in normal camera view). Although this can be circumvented by removing the raycast script on the ui element, it seems like an unnecessary step.
for idiots like me. if you have a text as a child for a button. And your text width is huge while your visible text is small. You should close raycast target for your text or adjust your text area properly. Empty areas of your text element will interfere with other buttons based on their hierarchy. lol.
hi everyone, i have same issue about few minutes ago. I solved the problem with checking image size. i mean i thought i could crop image clearly and i recognize i couldn’t. So unity thought this image size is bigger than user’s vision. So it was saying the click zone is large. (Ex: According to my opininon “my button size is 150150" why i have to click upper zone of button? – According to unity "this button size is 250250” because there little part of this image that user cant see).
I know i tell so bad but hope it is useful for you…
I solved this problem by removing Raw Images. A raw image was overlapping an area on my button and it made that area un-clickable, regardless of whether the button was above the raw image in the hierarchy. For some reason raw images and buttons don’t play nice so I switched my raw images to Sprites.
Been creeping on forums for far too long just looking for anwers to questions, but for this one i found myself the answer.
, It’s the text on those buttons that caused the issue, It’s most likely upscaled and inteferes with it’s parent.
Having same issue, it is Textmesh pro. When ever I have a TMP object as a child of a button on a canvas with “Raycast Target = true” if it helps the objects are all children of Horizontal Layout group that are children of a vertical layout group.
For anyone that may have this problem in the future and none of these tricks worked… Ask yourself, did you make custom buttons in photoshop or something like a photoshop app. My problem was that my photoshopped image width and height made a square, and I was making rectangular buttons. After I made those rectangular buttons I would just make everything else in the background transparent but unity still counts those transparent pixels as an actual clickable part of the rectangle. So, MAKE SURE TO FILL THE ENTIRE WIDTH AND HEIGHT OF YOUR IMAGE TO THE FULL SIZE OF THE IMAGE WHEN USING PHOTOSHOP (EX: If you’re trying to make a rectangular button, make the photoshop image size a rectangle and not a square). So in general, just don’t have transparent pixels, it may also mislead a player of your game! Btw, I spent days trying to figure this one out.
For idiots like me: double check if the text element that is a child of the button has no EVENT TRIGGERS attached to it, Those prevent the function of the parent from firing… That’s what happened to me at least
2022 and this answer is still relevant, hours I was trying to figure this out thinking it was something in my code when the text area was just too large.