Author Topic: Buttons not picking up events  (Read 4341 times)

Jon

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Buttons not picking up events
« on: August 12, 2012, 02:50:27 PM »
I have a fresh scene with a new GUI setup just as the tutorials show. I've added a button template with my own nine-sliced sprite. I've ensured the button  is configured the same as the ones in the tutorials, and double checked that it has a collider and that it is enabled. I've also ensured that my layers are all aligned (in this case it's all in the default layer since its just an fresh scene with only the wizard created GUI).

The button isn't picking up any event states. I've tried hovering, clicking, and disabling. I've tried adding debug logs to see if maybe it was only the display that wasn't happening, but the console isn't showing any logs. Any ideas?

I'm fairly new to nGUI, so I figure there's a good chance that I'm missing something simple, but I've struggled with this a while and done a bit of searching for a known answer without success. Any help would be appreciated.

Jon

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: Buttons not picking up events
« Reply #1 on: August 12, 2012, 03:13:05 PM »
FYI - I found the problem. The Button template is generating Box Colliders that are flagged with "Is Trigger" set to true. This is causing all collision based events to fail.

Is this intended functionality?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Buttons not picking up events
« Reply #2 on: August 12, 2012, 04:52:36 PM »
Yes it is. Go to physics properties and check "Raycast Hit Triggers".

Jon

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: Buttons not picking up events
« Reply #3 on: August 13, 2012, 08:49:12 AM »
Aren -

Thanks for your help! You've made an outstanding product here.