0
\$\begingroup\$

I'm using the new UI Toolkit and new Input System together, and I've setup everything correctly the Input Actions has separate input for UI, the Input System UI Input Module is setup correctly, the Visual Tree works in the scene, and my custom script has no errors, but for some reason my Button doesn't fire the clicked event. Everything works when debugged, I also made the button change color when active, which it does, but it doesn't fire an event...
enter image description here

enter image description here

enter image description here

enter image description here

\$\endgroup\$
2
  • \$\begingroup\$ Remember to always share code as text, not as an image. \$\endgroup\$
    – DMGregory
    Mar 8, 2023 at 19:43
  • \$\begingroup\$ @DMGregory right, will do! Thanks. \$\endgroup\$
    – Džoni
    Mar 10, 2023 at 19:43

1 Answer 1

0
\$\begingroup\$

I haven't mentioned how my UI Controller works, turns out that disabling a UI Document removes all events. Just reassign the events in the OnEnable() method.

\$\endgroup\$

You must log in to answer this question.

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