Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

Xbox controller not working?

Discussion in 'Windows' started by jeffman1, Feb 12, 2019.

  1. jeffman1

    jeffman1

    Joined:
    Oct 21, 2013
    Posts:
    17
    sorry for the weird posting but I need to know why when I build for UWP the xbox one controller I am using fails to work. I get it to work in stand alone build but not when I switch to UWP build. Its only when I switch that the support for the controller stops. Any help? (Note: using the standard assets third person controller).
    Here's a picture of my input manager setup:
    screen.png
     
  2. timke

    timke

    Unity Technologies

    Joined:
    Nov 30, 2017
    Posts:
    115
    To answer your question, UWP uses a completely different API compared to Windows standalone; it implements the WinRT "Windows.Gaming.Input.Gamepad" API whereas standalone uses XInput.

    As to why it's not working, we'll need some more information:
    - Can you elaborate on "fails to work"? Are you receiving any input at all, is the controller detected by Unity but not producing input events?
    - What version of Unity are you using?
    - Do you know (or can you check) if the controller works with other UWP games (want to eliminate hardware/system issues as the cause)
     
  3. jeffman1

    jeffman1

    Joined:
    Oct 21, 2013
    Posts:
    17
    For the first question, I receive no input at all compared to stand alone. It's only when I change project types from stand alone to UWP does this happen. I am using unity 2018.2.18f1 (edited to reflect the full version number. As far as I know other UWP games work. Give me a free one and I'll try it.
     
    Last edited: Feb 14, 2019
  4. jeffman1

    jeffman1

    Joined:
    Oct 21, 2013
    Posts:
    17
    I have edited the version number. Some other notes to mention are:
    • I am using visual studio 2017.
    • I am hoping to do debugging of the uwp game to an xbox one s console. I got it to deploy already but the character does the same idle animation but does not move.
     
  5. jeffman1

    jeffman1

    Joined:
    Oct 21, 2013
    Posts:
    17
  6. jeffman1

    jeffman1

    Joined:
    Oct 21, 2013
    Posts:
    17
  7. timke

    timke

    Unity Technologies

    Joined:
    Nov 30, 2017
    Posts:
    115
    Thanks for the updates.

    I did some checking with controller functionality for UWP (both wired and Bluetooth) but was unable to find the problem on Windows. I don't have an Xbox One S console readily available.

    The controller disconnect bug you mention is fixed in 2018.3 but so far hasn't been backported to 2018.2.

    So, at this point please file a bug so we can continue investigating the issue.
    Thanks.
     
  8. jeffman1

    jeffman1

    Joined:
    Oct 21, 2013
    Posts:
    17
    Thanks but upgrading unity to 2018.3 and disabling mobile input fixes this. I wish I saw the mobile input earlier though.
     
  9. cuttinged

    cuttinged

    Joined:
    May 12, 2013
    Posts:
    4
    I have the same problem in Unity 2019.1.0f2 LWRP 5.7.2. I have two controllers that switch when the character goes from sea to land. When on sea the character uses a physics script that I made, and everything works fine. When he goes to land and uses the standard 3rd person controller that comes with Unity the character idles and the camera look works but the character does not move walk or jump with wasd/space bar. This is happening in the editor. I converted the project from a windows build to a UWP build. The windows build works fine. The UWP build does not work. I tried disabling mobile input in the Mobile Input tab and it didn't have any change. Keys are set up right, because it works in the windows build and because everything works when the physics controller is active (the player is on a layer with a different tag). There are no errors on the console and I'm not sure what to try to fix it from here. Any update to this question would be appreciated.
     
  10. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    7,189
    Which one is that?
     
unityunity