Search Unity

Question Switch Pro Controller continuous input problem

Discussion in 'Input System' started by Iatroph, Jan 30, 2021.

  1. Iatroph

    Iatroph

    Joined:
    Nov 6, 2019
    Posts:
    1
    Hello, I've been trying to get a pro controller working with Unity for quite some time now and I'm on the brink of getting it to work.

    Following advice from this reddit post
    https://www.reddit.com/r/Unity3D/comments/ko7b6a/switch_pro_controller_input_not_recognized/

    I installed BetterJoyforCemu and now Unity recognizes the pro controller as an xbox controller and inputs "work".

    However, like this other reddit post I found from 2 months that went unanswered
    https://www.reddit.com/r/Unity3D/comments/jpwj8l/pro_controller_input_going_crazy/

    Whenever I try to test a button input (A,B,X,Y), Unity responds as if those button inputs are being executed continuously all at the same time even if no button is being pressed on the controller.

    Does anyone know what's going on and if possible a fix?
     
    RadJor64 likes this.
  2. unity_sergigil

    unity_sergigil

    Joined:
    Nov 11, 2019
    Posts:
    15
    yeah I have same issues.... using MAC.. switch controller pro using Unity MAC & Linux Standalone platform version 2020.2.1 and input system 1.0.2

    With the examples provided in the input system package I have the behaviour that the left pad is constantly pressed and the A,B,X,Y buttons too.... Is there a way to fix this?
     
  3. unity_sergigil

    unity_sergigil

    Joined:
    Nov 11, 2019
    Posts:
    15
  4. dmytro_at_unity

    dmytro_at_unity

    Unity Technologies

    Joined:
    Feb 12, 2021
    Posts:
    212
    It should work if you connect it over bluetooth, I've tried it myself and it worked without any additional drivers. Unfortunately Switch Pro controller is not a standard USB HID complaint controller, so even Windows itself cannot recognize it when connecting via USB (you can observe that if you open "Set up USB game controllers" when Switch Pro is connected, there is no input coming over USB)

    > Whenever I try to test a button input (A,B,X,Y), Unity responds as if those button inputs are being executed continuously all at the same time even if no button is being pressed on the controller.

    Check if you have Steam running, they send some special commands to the controller, and it starts generating non USB HID compliant messages.
     
    RedCabinGames and DownUnder like this.
  5. unity_sergigil

    unity_sergigil

    Joined:
    Nov 11, 2019
    Posts:
    15
    I tried again with macOS Catalina 10.15.7+ unity 2020.2.4f in PC, MAC & Linux Standalone + input system v1.0.2 + switch pro controller via bluetooth + No steam installed in my machine

    So the result is the same... testing in an empty project, with only the simple demo example from input system, it seems that the player is constantly rotating to the left and firing all the time without pressing anything...

    Have you tried with the same or similar configuration @dmytro_at_unity ?

    Check this image with the input debug for WsitchProControllerHID, having it quiet in the desktop without pressing anything

    is constantly changing the value for ButtonEast, North, South and West from 0 to 1, and constantly updating the left styck values
     

    Attached Files:

  6. dmytro_at_unity

    dmytro_at_unity

    Unity Technologies

    Joined:
    Feb 12, 2021
    Posts:
    212
    Works for me on 10.15.7 + 2020.2.4f1 + v1.0.2 + controller bluetooth.

    Would you mind to check if something like https://apps.apple.com/us/app/controllers-lite/id673660806?mt=12 recognizes it correctly? If yes, meaning the application recognizes and reports data correctly, but Unity does not, then please file a bug report, don't forget to attach the device descriptor (right click in input debugger on the device, and save device descriptor, it's a long json).
     

    Attached Files:

    Last edited: Feb 15, 2021
  7. unity_sergigil

    unity_sergigil

    Joined:
    Nov 11, 2019
    Posts:
    15
    Hi!

    yesterday I tried again and finally I get it to work.... What I did:
    • desync bluetooth controller pro from MAC
    • sync bluetooth controller pro again with MAC
    • Use controllers-lite to test and seems that it was working
    • Open unity project and it worked
    Something that was different from the latest time that I tested is that this time the blue led in the home button was not activated and all the previous times it was... perhaps this leds indicates something important?

    Thanks for all the help and the good job you are doing with the new input system!!!

    Sergi
     
  8. Jnicocom

    Jnicocom

    Joined:
    Jul 15, 2018
    Posts:
    5
    I have the same problem.
    • macOS Big Sur 11.4
    • Unity 2020.3.10f1
    • Input System 1.0.2
    I'm not touching any button:

     
  9. PerunCreative_JPolach

    PerunCreative_JPolach

    Joined:
    Jan 16, 2020
    Posts:
    3
    Any news on that? Same problem
    Windows 10, Unity 2020.3.16f1, Input system 1.0.2

    Is there possibility to fix the new input system?
     
  10. DDmeow

    DDmeow

    Joined:
    Sep 5, 2020
    Posts:
    15
    Same problem. Unity 2021.1.5f1, Win 10, Input system Version 1.0.2,
    connecting via USB (I don't have Bluetooth).
    steam is not running.
    Windows can recognize it and I can play steam games with it.
     
  11. dmytro_at_unity

    dmytro_at_unity

    Unity Technologies

    Joined:
    Feb 12, 2021
    Posts:
    212
    Would you mind folks to report this as a bug (help->report bug) so it's in the pipeline/can be voted/etc? Thanks a lot
     
  12. EmmaEwert

    EmmaEwert

    Joined:
    Mar 13, 2014
    Posts:
    30
    It might be worth noting that as a workaround, you can add Unity Hub as a non-Steam game on steam - if you then launch Unity Hub through Steam, the Switch Pro Controller works even when wired through USB.

    At least, that worked for me on Windows 10.
     
  13. GNPhoque

    GNPhoque

    Joined:
    Jun 9, 2017
    Posts:
    25
    Tried doing this but steam only recognizes UnityHub for a few seconds for me (I can see playing Unity Hub and after a few seconds just Online in my contacts list) so controller ends up never working,

    Do you have a workaround for this behaviour?
     
  14. emillinden

    emillinden

    Joined:
    Nov 9, 2020
    Posts:
    1
    Last edited: Jan 29, 2022
    RedCabinGames likes this.
  15. Arrdenet

    Arrdenet

    Joined:
    May 15, 2022
    Posts:
    10
    I'm here in May of 2022 and it's still not working worth anything. I'm a complete noob when it comes to all things game development, so could someone help me figure out how to use the resource here? What do I do with it?
     
  16. ifightnoman

    ifightnoman

    Joined:
    Jan 15, 2022
    Posts:
    15
    Any ETA on version 1.4.0? Seeing the same thing as everyone else—tried 3 different Switch Pro controllers and a variety of configurations.
     
  17. cbacon46

    cbacon46

    Joined:
    May 2, 2021
    Posts:
    1
    I know this is an old thread - but for me, it was Steam running in the background. As soon as I exited Steam, everything worked flawlessly. After over 4 hours of debugging......lol
     
  18. doodiedaddie

    doodiedaddie

    Joined:
    May 4, 2022
    Posts:
    1
    I don't have steam and still get these issues on 2022.1.5f1


    EDIT: 2022.1.21f1 fixed it on my end. If you can update, do it.
     
    Last edited: Nov 4, 2022
  19. MaximumSpice

    MaximumSpice

    Joined:
    Oct 25, 2018
    Posts:
    22
    I actually have a weird bug with this.

    My wired pro controller works fine EXPECT that I have mapped buttons like 'A' for submit on UI's as I couldn't get a submit button working (using the new Input System to be clear) and it does not work.

    The button i used for cancel works fine, but I cannot click buttons. Very weird.
    Using Unity 2021.3.16f1

    EDIT: After connecting my pro controller via bluetooth, I still have the same problem, my mapped buttons don't actually work correctly with UI but they do in-game.

    I do have a UI Input component plus my xbox controller works correctly. Weird
     
    Last edited: Feb 28, 2023
  20. Nackley

    Nackley

    Joined:
    Aug 14, 2022
    Posts:
    5
    Unity Version 2022.1.16f1. I had the same problem with my inputs continuously being pressed when using my switch controller. I found out the problem was related to the wired connection. Connecting a switch controller through usb to your PC causes problems with inputs. If you connect through Bluetooth the problem resolves itself. At least it did in my case. I was stuck on this problem for a year and finally, the simple fix of Bluetooth connection seemed to have done the trick. Hope this helps!
     
  21. BeautifulFish

    BeautifulFish

    Joined:
    Sep 25, 2014
    Posts:
    55
    I seem to be having this issue in v2022.2.19f1 with the new input system.
    I have a bluetooth Switch Pro joycon that works ok in Dolphin, Steam via Bluetooth. However, in Unity the only things that work is double pressing my analogue sticks for a debug menu via bluetooth. Interestingly, I can navigate this debug menu fine with the controller. Plugging the controller in causes my character to walk forward endlessly and input is unresponsive/buggy.

    UPDATE: Tell a lie. I wasn't properly using the new input system. It worked after using PlayerInput action file.
     
    Last edited: May 22, 2023
  22. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,086
    How about just with Input Manager?

    What is the text string for a positive button press for a Nintendo Switch Pro Controller?

    I can't get ANY input recognised from a successfully connected (Bluetooth) Nintendo Switch Pro Controller, no matter what versions of things like

    "joystick 0 button 1"
    or
    "joystick button 1"

    etc.

    Unity 2022.LTS
    Latest MacOS on latest m2 Max
     
  23. xand0

    xand0

    Joined:
    Dec 13, 2020
    Posts:
    1
    Had this issue on Unity 2022.3.3f1 for Windows 10. I restarted my computer and connected my Pro Controller to my switch (either of these steps may be sufficient). Then I reconnected the controller to my computer via bluetooth and it was paired without the blue LED activating. For me, so long as my Pro Controller is connected without its blue LED turned on, I have no issues with Unity registering its inputs.
     
  24. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,086
    It's not possible to get a Switch Pro Controller working with a Mac and Unity Editor. Can be done in Xcode builds. But it's blind faith required to make it happen in Unity, until such time as the Xcode build has included the library that sees it.
     
  25. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,426
    Er, false?
     
  26. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,086
    Prove me wrong ?

    * without using the new Input System!
     
  27. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,426
    Dunno, dude, you just come out with a blanket statement like that, while I'm using SPC on MacOS in the Unity Editor (or Mac builds) with the Input System just fine. Where are you stuck? Binding Bluetooth? Getting any gamepad inputs?

    Now, the Switch Joycons have additional magic you'd need a Nintendo Dev setup to use, but...
     
  28. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,086
    I've done everything possible with Unity, MacOS and the old input system. It can't be made to work with a Switch Controller Pro.

    Joycons are somewhat possible. But not the Pro Controller.
     
  29. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,086
    Just on this... we're in the Unity forums. It should go without saying that most things cannot assume, nor be presumed, to just work. Very few parts of this engine have ever been like that, and it's getting worse, not better.

    You know that, I know that, everyone knows that.

    I've been recently reminded of this whilst learning to use Blender... and finding the controls as byzantine and counterintuitive as possible... as though deliberately given an idiosyncratic control scheme for developer in-house entertainment. Other than that, the amount of stuff that not only just works, but is over-engineered such that those of us coming from top tier 3D content creation products can find what we need is somewhat there... is incredible.

    And it's truly free. And the UI scales and all sorts of other things just work.

    And it's got three different rendering pipelines. And they all just work.

    And it's small, sings along fast, uses all the cores and the GPU of the M2 Mac... how can this be done?

    It's magical.
     
  30. deek0146

    deek0146

    Joined:
    Mar 21, 2013
    Posts:
    4
    This is obviously not true because plenty of other applications can use the pro controller just fine (this website for example https://hardwaretester.com/gamepad )

    This is a unity specific issue, with both the old InputManager and the new InputSystem, that it misreads the pro controller's input.
     
  31. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,717
    Same, but I also have problems using official (Steelseries Nimbus) MFI controllers with a recent Unity editor on a Mac (and the old input manager). My guess is they broke something in 2021 and now it's just broken.

    At least builds work fine. I just can't test with controllers in the editor.
     
    Unifikation likes this.