I have done all kind of setting like graphic raycast and interactable but it still cannot be clicked
I want to click upgrade button which is world space canvas
Here, the panel’s name is Buttons
Really hard to say, but you seem to have multiple canvases, and the one you have problem with (the selected one in hierarchy) is topmost; You could have something blocking the button, your other canvas might have different/higher sorting order than your button’s canvas and if it has a panel (for example) over button, this will make the panel block the button in another canvas.
Try disabling all other canvases, check for panels overlapping button, disable all canvas groups if you have those (might be set block raycasts).
Actually, I have figured out.
I just have to set the ‘Event Camera’ in canvas component to ‘Main Camera’
Thanks for posting the answer to this. This was driving me nuts!
Bruh! Ive been trying to fix this for hours. Thank you so much. If its helpfull for anayone else, I also changed the render mode, to World Space in the canvas inspector and clipping planes to 0 in the camera inspector. Im currently building an UI.
Had a similar problem, I had a panel inside the canvas, panel had a canvas component but was missing the graphic raycaster - that fixed it for me