Author Topic: Events not firing...  (Read 4442 times)

Whippets

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Events not firing...
« on: July 01, 2013, 12:17:51 PM »
Hi, I've just purchased NGUI, and am working out how it operates (so pretty nooby).

I have a GameObject with a UITextList attached to it. I've also attached a BoxCollider, so that mouse click events will be triggered. I've edited the UITextList.cs file so that OnSelect and OnScroll events give a debug.log just to show that they've triggered.

However, no events seem to trigger, the object is never selected. I've no real idea where to start looking to find a solution; does anyone have any idea what may be wrong?

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Events not firing...
« Reply #1 on: July 01, 2013, 06:46:03 PM »
Check your UICamera: Does the Event Receiver Mask on the component correspond with the layer you're putting your colliders/UI in?

Is physics triggers set to fire on raycasts? (It's a toggle in the physics setting)

ddfire

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 32
    • View Profile
Re: Events not firing...
« Reply #2 on: July 01, 2013, 09:47:13 PM »
Start with the examples... in 99% of the cases NGUI works perfectly.
Check the layers...

Whippets

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Events not firing...
« Reply #3 on: July 02, 2013, 04:54:44 AM »
Thanks guys, that gave me the info I needed XD I had one object in the UI_Root tree that was set to the wrong layer. Changed that, and it all works perfectly (well, gives me a load of errors, but those I can run through np).