Author Topic: UIKeybinding Xbox Controller issue  (Read 1824 times)

Bill.Smock

  • Newbie
  • *
  • Thank You
  • -Given: 6
  • -Receive: 2
  • Posts: 19
    • View Profile
UIKeybinding Xbox Controller issue
« on: June 02, 2016, 06:40:10 PM »
Using UIKeyBinding and UIKeyNavigation I've successfully gotten through NGUI 3.6.0 tutorial #3.  The navigation works perfect.  The button, however, only works once on the color change.  So if I hit A (joystick 0) on make red the color changes to red.  The problem is that it changes red on every single button.  The mouse still works correctly - red to red, blue to blue, green to green.  The only problem appears to be using the joystick button.  All of them have Modifier = Any and Action = Press And Click.  I've restarted Unity and it still doesn't work.  Oddly, it switched from only changing to Red to now only changing to Blue. 

edit:  Okay I referenced one of the examples and found that UI Key Binding isn't necessary because it will default to A and work correctly.  However, what if I wanted to use a different button, do I somehow need to override A?  If I switch to UIKeyBind to B (joystick 1) I run into the same issue.  No one in their right mind would ever use B for a menu item, but I'd like to know how to make it work. 
« Last Edit: June 02, 2016, 07:40:32 PM by Bill.Smock »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIKeybinding Xbox Controller issue
« Reply #1 on: June 04, 2016, 02:37:18 PM »
The button that counts as "submit" in NGUI is specified on UICamera under "Axes and Keys".