1
\$\begingroup\$

I'm working on a menu with several buttons and input fields. For a while everything was working fine, but suddenly every button and input field is not reacting to being clicked on, as if everything's been disabled.

This problem is only occurring in one of my scenes. My canvas has a graphic raycaster and my buttons have methods attached to them.

\$\endgroup\$

2 Answers 2

1
\$\begingroup\$

you need an active EVENT SYSTEM in your scene to be sure your UI works properly. adding a new canvas first checks that there is a Event System.if there is not, add a new one.

its possible that you have made a panel with checked Raycast Target that obscured that back panels. so you cant interact with them.

\$\endgroup\$
0
\$\begingroup\$

Switching my UI assets to a new canvas fixed the issue, but I'm still not sure why that was necessary. The new canvas is identical to the old in the inspector.

\$\endgroup\$
3
  • 3
    \$\begingroup\$ You probably accidentally deleted the Event System component. Creating a new Canvas would have automatically replaced it. \$\endgroup\$
    – DMGregory
    Apr 28, 2019 at 20:02
  • \$\begingroup\$ As @DMGregory said, without EventSystem component, You can not interact with the UI \$\endgroup\$ Apr 29, 2019 at 6:43
  • \$\begingroup\$ I had this problem also. Changing some setting must have broken something. I had to remove and then add all the canvas components again. \$\endgroup\$ Mar 13 at 11:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .