Author Topic: OnInput & UIForwardEvent woes  (Read 3026 times)

Joe @ ByDesign Games

  • Guest
OnInput & UIForwardEvent woes
« on: July 10, 2013, 12:19:34 PM »
Using UIForwardEvents to forward several different OnInput instances to a single manager class, what is the best way to filter for each of them in the receiving OnInput method?

Also, is there a reason that OnInputChanged message doesn't go through the eventReceiver and/or is not forwarded with UIForwardEvents?

Thanks!

j

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: OnInput & UIForwardEvent woes
« Reply #1 on: July 10, 2013, 01:00:12 PM »
UIInput.current

Joe @ ByDesign Games

  • Guest
Re: OnInput & UIForwardEvent woes
« Reply #2 on: July 10, 2013, 02:37:08 PM »
UIInput.current
We tried that, but it wasn't working for some reason.

We opted to filter for UICamera.selectedObject and that seems to be working.

Though of course, we can't use switch on type GameObject (which both .selectedObject & .current are), so we're now using a series of if statements :P

Also, is there a reason that OnInputChanged message doesn't go through the eventReceiver and/or is not forwarded with UIForwardEvents?
Any word on the discrepancy here?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: OnInput & UIForwardEvent woes
« Reply #3 on: July 10, 2013, 08:43:33 PM »
Legacy functionality support pretty much. Did it one way before event receivers were added, and couldn't change it without breaking backwards compatibility.