Author Topic: Custom script doesn't catch OnKey event  (Read 2832 times)

ngc2070ch

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Custom script doesn't catch OnKey event
« on: November 19, 2015, 06:57:40 AM »
Hi,

I've button with a simple script to catch key events but the script never receive the OnKey event.
This looks a very weird question but I'm going crazy trying to know what's happening.

Why the script doesn't receive the event?

PD.: OnClick events are catched correctly.

Thanks

Regards

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Custom script doesn't catch OnKey event
« Reply #1 on: November 25, 2015, 04:55:00 PM »
What OnKey notifications are you expecting? NGUI will send OnKey notifications if you have keyboard input enabled on UICamera, and they will only be sent to the currently selected object (last one you clicked on). Check how it's used in UIKeyNavigation.OnKey.