Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

XBox Controller Setup

Discussion in 'Windows' started by Deleted User, Jul 15, 2016.

  1. Deleted User

    Deleted User

    Guest

    Is there any documentation or instructions on how to setup the input to handle xbox one controller? Using UWP to deploy to my xbox for the time being. Also why is the download link dead for xbox one support?
     
  2. Swiftle

    Swiftle

    Joined:
    Feb 11, 2014
    Posts:
    37
    Would also like to know more about this. Currently the Xbox Controller works fine in standalone and editor but not when building for WSA Win 10 UWP. Both Input.GetJoystickNames() and Windows.Gaming.Input.Gamepad.Gamepads tell me that there are no controllers detected.

    I've tried adding the HumanInterfaceDevice capability in the app manifest but the result is the same.
     
  3. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,577
    HumanInterfaceDevice doesn't need to be added to the app manifest. The Xbox One controller is handled by Windows.Gaming.Input (XInput equivalent) which is always enabled. It should just work.
     
  4. Swiftle

    Swiftle

    Joined:
    Feb 11, 2014
    Posts:
    37
    That's what I've read but the Gamepad class isn't detecting any gamepads (Windows.Gaming.Input.Gamepad.Gamepads.Count = 0). Same goes for Input.GetJoystickNames(). I've tried this on an empty project and still get the same results. I've used the same controller succesfully inside the Editor, in a standalone build and a XboxOne build but it's doesn't work for UWP. I am building for Universal 10 with D3D using the .NET backend and I'm currently using unity 5.3.5p7.

    EDIT: Ok turns out it was a driver issue. In the Device Manager the controller was being detected as Microsoft Xbox One Controller. After updating the drivers it was displayed as Xbox Controller and now it works well.
     
    Last edited: Jul 22, 2016