Search Unity

Question New Input system does not support old controllers but old Input system does

Discussion in 'Input System' started by kader1081, Apr 21, 2023.

  1. kader1081

    kader1081

    Joined:
    Oct 16, 2021
    Posts:
    379
    Hi after 3 long day i find a way to add controller support to my game. Problem was when i use new input system i used gamepad for binding but my controller didn't response i believe my controller is ps2 controller which i have 2 of them with different producer. When i used Input.GetKey(KeyCode.joystick..) it didn't work as well for example when i use button5 my first controller responded but my second controller didn't and when i add an axix on edit-> Project settings -> Input Manager it worked. In mt theory new Input system support only new controllers for example ps4
     
  2. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,925
    How did you set up game pad support in the new Input System? All your examples above were with the old input system.
     
  3. kader1081

    kader1081

    Joined:
    Oct 16, 2021
    Posts:
    379
    s.png
     
  4. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,925
    And did you register to these inputs via code?
     
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    Input devices need to have configurations created for them to work out of the box with the new input system. You can check if the device is recognized with the Input Debugger (Window -> Analysis -> Input Debugger).
     
  6. kader1081

    kader1081

    Joined:
    Oct 16, 2021
    Posts:
    379
    isnt this registrations
    Code (CSharp):
    1.  
    2.             input.Controller.moveCursor.started -= moveCursor;
    3.             input.Controller.Select.started -= select;
    4.             input.Controller.moveCursor.started += getFunction.navigateMainMenuHeroes;
    5.             input.Controller.Select.started += getFunction.selectHero;
     
  7. kader1081

    kader1081

    Joined:
    Oct 16, 2021
    Posts:
    379
    yes ı can see the device
     
  8. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,073
    kader1081 likes this.
  9. kader1081

    kader1081

    Joined:
    Oct 16, 2021
    Posts:
    379
    Does old input system support the devices on the list I made a new axes . Its positive button is "joystick button 2" when i press button south on my controller it works will it work on xbox or ps4 controller or do i have to use new input system for new devices . I think i will buy a new contoller
     
    Last edited: Apr 24, 2023
  10. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,073
    It works with Xbox and PS4 controllers on desktop (not PS4 the touchpad) and consoles.
     
    kader1081 likes this.