I was making a Tower Defense game, and I hade made an upgrade UI, all I had to do was change it from on hover over the tower to on click. I made it on-click, and it worked fine, until later. All the buttons just stopped working, but ONLY in the upgrades and sell UI. The hover effect doesn't even work anymore.
Here's what I have:
- A Camera assigned to the Canvas seeing as it is world space.
- An EventSystem.
- Interactable and Raycast Target enabled on the buttons, but nothing else.
- A Graphic Raycaster, a Canvas, Canvas Scaler, and a Canvas Group on the Canvas.
Here's what I have tried:
- I have tested the EventSystem for registering the PointerEnter and PointerClick, no results. It's like the buttons don't exist.
- Moving the buttons outside of the Panel.
- Deleting the Empty GameObject that was a parent to the Canvas.
- At least four questions on Stack Overflow.
- At least two questions on Stack Exchange.
- At least six questions on the official Unity site.
- At least two videos.
- AND I DID EVERY SINGLE TRICK IN EVERY SINGLE ONE OF THE ANSWERS.
Here are some screenshots of things in the game:
The EventSystem being unresponive with the buttons:
Debug.Log(EventSystem.current.currentSelectedGameObject);
Result:
null null null null null null null null null null null null null null null null even when I click on buttons that work.
Ask me if you need any other information, just ask. I'm getting extremely desperate.