Author Topic: Button not working  (Read 2802 times)

Ingot

  • Guest
Button not working
« on: February 21, 2013, 02:26:45 AM »
I created 2 panels, one for HUD and one for Character sheet. I added a button to the Character UI panel and set it's layer
to match that panel, but the button does not work. When I say it does not work, I mean that it does not scale, make
click sound, and does not change offset even though the button was created using the defaults for those and the
audio clip was added to the script. I checked the button's z value and ensured that it was in front of all of the other
GUI elements, but it still does not work with mouse over and does not detect the mouse click. I am using a culling
mask for the Character UI panel that toggles it on and off with a keypress, but I don't think that would affect it.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Button not working
« Reply #1 on: February 21, 2013, 04:38:39 AM »
Do other buttons work? If no, check all the usual suspects -- UICamera enabled on the camera used to draw the UI, camera event mask set to what you need it to be (not just the culling mask!), and Raycast Hit Triggers checked in physics settings.

Ingot

  • Guest
Re: Button not working
« Reply #2 on: February 21, 2013, 10:18:22 AM »
It was the event mask. Thank you very much!