Author Topic: UIButton Click [SOLVED]  (Read 1825 times)

h2hjastermereel

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
UIButton Click [SOLVED]
« on: October 15, 2013, 03:04:44 PM »
I have attached a button to a panel and attached my script to the method field. It is however, not working. I know the collider works because if I add an OnMouseDown method to my script then that fires. It is just the built in NGUI method of dealing with button clicks that is not working. I have attached a screenshot of my code and UIButton setup.
« Last Edit: October 15, 2013, 06:37:15 PM by h2hjastermereel »

h2hjastermereel

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: UIButton Click
« Reply #1 on: October 15, 2013, 06:19:53 PM »
Wait I am on Unity 3.5.7 is that the issue!? Is OnClick a Unity 4 event?

h2hjastermereel

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: UIButton Click
« Reply #2 on: October 15, 2013, 06:36:55 PM »
Solved it.  Needed to set the "Event Mask" to my GUI layer on the camera. No clue how it was not set correctly.