Search Unity

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

Using Nintendo Switch Pro Controller

Discussion in 'Input System' started by wojwen, Jan 23, 2019.

  1. wojwen

    wojwen

    Joined:
    Feb 13, 2018
    Posts:
    38
    I want to buy a controller to play some games on my PC and Switch but also to imlpement controller suport for the game I'm working on. I started using the new input system, but I can't find bindings for the Switch Pro controller in it. I know that Xbox (Xinput) controllers are the standard for PC, but since I have a Switch the pro controller would be the best. Could somebody confirm if it can work with the new input system or if the support is planned?
     
  2. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    It's planned but not actively being worked on ATM. No ETA yet.
     
  3. wojwen

    wojwen

    Joined:
    Feb 13, 2018
    Posts:
    38
    Is you github release timeline up to date? If yes, will it be present in the March 2019 1.0-preview release?
     
  4. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    No guarantee ATM. I have it on my list of stuff I really want to have in 1.0-preview and I'm pretty sure it will be fairly quick to set up, but ATM there's still so much other stuff that needs to get addressed first that I'm not sure we'll get to it in time. But we'll try our best :)

    ////EDIT: Oh and yes, to answer your question, the info in the README is pretty up to date.
     
  5. wojwen

    wojwen

    Joined:
    Feb 13, 2018
    Posts:
    38
    Great, thanks for working on this stuff, it's already miles ahead of the previous input system :)
     
  6. Retrovius

    Retrovius

    Joined:
    Mar 10, 2018
    Posts:
    2
    Any updates on this thread, @Rene-Damm ? I've been struggling with this (and joy con support) for a while. Motion controls are not being read in from the Pro Controller or the Joycons
     
  7. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    The Switch Pro controller should work on Windows and Mac but without the sensors. Joy-Cons not yet.

    In general, the problem with those sensor controls is that the formats are usually proprietary and undocumented. Means that it depends on someone having successfully reverse-engineered the thing. I know that for PS3 and PS4 controllers, the information can be found (adding support for these is on the list) but often this is not the case with specific controllers.

    What the actual status WRT this is for the Pro and Joy-Con controllers is I'm not sure. Haven't looked into this myself. But these being Nintendo controllers, my assumption is the situation isn't any different than from other console-specific controllers.

    Best I can offer at this point is that we'll have another look at this after 1.0. Not much at this point :/
     
  8. ryanslikesocool

    ryanslikesocool

    Joined:
    Jul 31, 2016
    Posts:
    49
    Any updates on this? Even the Switch Pro Controller is acting janky in Unity with the Input System, like claiming I'm randomly pressing buttons when I'm not, even though this site works with it fine.
     
  9. Meorge

    Meorge

    Joined:
    Feb 10, 2017
    Posts:
    21
    I'm having the same issue - when I connect my Pro Controller to my computer, the Input Debugger shows it as entering tons of inputs at the same time, seemingly randomly. However, using the website that ryanslikesocool linked, the Pro Controller seems to work fine
     
  10. LeftyTwoGuns

    LeftyTwoGuns

    Joined:
    Jan 3, 2013
    Posts:
    260
    This issue still has not been resolved by Unity.

    Unity recognizes the Switch Pro controller as Switch Pro controller and input is recognized, but the Input System is recording constant random input from the controller. Xbox Series X controller doesn't have this issue with Input System nor does Switch Pro controller have this issue on other Windows applications and games.
     
  11. ultraxdzn

    ultraxdzn

    Joined:
    Nov 3, 2017
    Posts:
    2
    I have the same issue :(
     
  12. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
     
  13. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,526
    Just remember that the chances of winning a GPU are much higher than getting the bug fixed in a timely fashion.

    Plus my money's on QA saying it's a feature request instead of a bug.
     
  14. Meorge

    Meorge

    Joined:
    Feb 10, 2017
    Posts:
    21
    Good update on this! ...I think.

    I've been working on getting the Joy-Cons to play nice with the Input System, and in my research (which has largely consisted of reading through the documents at https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering), I think I've found out why the Pro Controller seems to give nonsense noisy inputs. The Pro Controller and Joy-Cons have "standard" and "simple" input report modes. In "simple" mode, they only make a report when the input state changes (i.e. a button is pressed or unpressed), and they follow the format described at https://github.com/dekuNukem/Ninten...blob/master/bluetooth_hid_notes.md#input-0x3f. In "standard" mode, they report at 60 Hz intervals, with a different format: https://github.com/dekuNukem/Ninten...oth_hid_notes.md#standard-input-report-format. This format includes a "timer" byte that increments with each report, and wraps back to zero once it hits the byte limit. The Input System's current controller mapping of the Pro Controller incorrectly maps the timer byte to some button inputs, which causes the apparent noisy input.

    I recorded a short but epic video demonstrating how you can expose the timer from the existing controller bindings: