Home > Back-end >  Why is my button isn't working - Unity 3D
Why is my button isn't working - Unity 3D

Time:08-22

i'm making a game on unity and i don't know why but my button "Upgrade" doesn't work, i can't click it, i searched for solutions and here is what i tried :

  • check if any UI is blocking the way
  • check if i had "interactable" and "raycast target" activated
  • check if i had an event system

maybe it is from the physics settings in Edit -> project settings -> physics because i had to deactivate some things for other stuff, but i think i already tried to reactivate all to see what it did.

https://i.stack.imgur.com/eGhEw.png

here is the project in version 2020.3.33f1 if you want to try something :

https://www.mediafire.com/file/6o17nul40eqtlu9/Mini_RPG.zip/file

CodePudding user response:

I do believe that EventSystem should be outside of Canvas. It also may be the fact that the button does not have an OnClick event property set, unless you are setting it through code.

CodePudding user response:

I figured it out, you can't put a button on a image (set it as his child), i replaced the image by a pannel and it works.

  • Related