Search Unity

Using old and new input system at the same time.

Discussion in 'Input System' started by libra34567, Aug 11, 2021.

  1. libra34567

    libra34567

    Joined:
    Apr 5, 2014
    Posts:
    62
    Sooo, I'm at a awkward point where I'm using both new input system and the old one.

    I'm using new input system for "Feel"'s haptic feedback. And I'm using old input system for "Rewired"

    The problem I met is, my game have multiple joystick on the same PC. And I couldn't find a way to figure out which new input system's gamepad with old input system's gamepad. So I would often trigger the wrong vibration.

    I couldn't find the hardware Id for the new input system that would match the old system. Please Help.
     
    kshitijv and joeface71 like this.
  2. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Setting "Active Input Handling" to "Both" in the Player Settings will enable both to run side by side. Not supported on all platforms and not extensively tested/support but should generally work.
     
    kshitijv, joeface71, ShmEmad and 4 others like this.
  3. codexin

    codexin

    Joined:
    Apr 4, 2018
    Posts:
    4
    May I ask what do you mean of player setting? is it you mean Project setting > player ?
    Thanks
     
    kshitijv likes this.
  4. flashframe

    flashframe

    Joined:
    Feb 10, 2015
    Posts:
    797
    This is from the user guide:

    https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/Installation.html

    Hope that helps!
     
  5. Sightwalker

    Sightwalker

    Joined:
    Jan 7, 2015
    Posts:
    4
    Yes. That's exactly it!
     
  6. CaseyHofland

    CaseyHofland

    Joined:
    Mar 18, 2016
    Posts:
    613
    May I suggest an option where you can have "Active Input Handling" set to e.g. "Input System Package" for builds but "Both" for editor? I always find myself switching to "Both" mid-project because of Asset Store packages with examples or features we're trying out, scripts from stackoverflow we drop in to quick-and-dirty test a prototype - so we need "Both" to have all these prototype features work correctly but then want "Input System" only for our final code. It's just a bit annoying that if someone forgets to switch this before build, suddenly we have a useless system running in the background taking up CPU.
     
    Artemko_one and Rupture13 like this.
  7. TKDHayk

    TKDHayk

    Joined:
    Dec 22, 2015
    Posts:
    130
    guys Am I blind? I dont see an "Active Input handling" Option under Player settings in 2021.3
     
  8. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    Last line under "Configuration" ... in 2022 LTS.
     
  9. Strom_CL

    Strom_CL

    Joined:
    Nov 17, 2012
    Posts:
    115
    I have my "Active Input Handling" set to both but my EventSystem is complaining that the old InputManager is disabled, which it is not. Anyone have a fix for that? I'm on 2021.3.33f1

    upload_2024-2-6_13-19-23.png
     
  10. CaseyHofland

    CaseyHofland

    Joined:
    Mar 18, 2016
    Posts:
    613
    Not an answer to your question, but what’s your reason for not upgrading the EventSystem?
     
  11. Strom_CL

    Strom_CL

    Joined:
    Nov 17, 2012
    Posts:
    115
    I'm using the new InputSystem for controller input and button binding in game, but my menus are all setup using older input scripts. If I hit that replace button then all of my mouse and keyboard input on my menus stop working. Just not something I want to chase around to find out what the issue is, and figured if Unity supported both I'd use it, but it looks like theres a few input related bugs around still.
     
  12. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,145
    Have you verified that the Standalone Input Module will in fact not work as it states? Because I seem to recall seeing a message like this in a previous project only for it to not actually matter at all.
     
    CaseyHofland likes this.
  13. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,511
    It would be great if Unity enforced using #if defs for new assets that touch input to support both/either, so end users don't need to resort to this because you're right it's annoying with so many assets. Or maybe they have a little Input utility by now?
     
    Sightwalker likes this.