Author Topic: How to add new inputs via UICamera.onCustomInput callback?  (Read 2346 times)

Highlander

  • Guest
How to add new inputs via UICamera.onCustomInput callback?
« on: February 13, 2013, 06:47:03 PM »
The release notes mention this:
- NEW: Added UICamera.onCustomInput callback making it possible to add input form custom devices.

I am curious to know how you would implement this callback to process your own custom inputs from a different input device.

Also is this the only way to add custom inputs or is it be possible to change the code in NGUI.dll where the UICamera is implemented?

Thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to add new inputs via UICamera.onCustomInput callback?
« Reply #1 on: February 13, 2013, 10:33:28 PM »
NGUI doesn't contain a DLL. Only the free version does.

Custom input callback is intended for custom input, such as WP7 touches. You are welcome to use it for anything else you may need that's not directly supported by Unity. Usage is simple. UICamera.onCustomInput = YourFunction.