Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Official Input System 1.4.1 released

Discussion in 'Input System' started by Schubkraft, Jul 8, 2022.

  1. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,042
    Dear Input System users!

    Please hold upgrading, we're investigating the issues found below.

    We released version 1.4.1 of the Input System package.
    Note that Input System 1.4.0 was never promoted/published due to a regression being found late in testing.

    Release notes summary:
    • Added/extended support for gamepads: Nintendo Switch compatible controllers, SteelSeries Nimbus+ on Mac.
    • Added support for Unity Remote app with the Input System on Unity 2021.2.18 and later.
    • Added a new DeltaControl for relative value controls, e.g. Mouse delta/scroll.
    • Added a new API for getting and setting parameter values on interactions, processors and composites.
    • Added support for keyboard shortcuts and mutually exclusive use of modifiers.
    • Added support for Game Core platforms to XR layouts, devices, and input controls.
    • 25 bug fixes in various areas: actions, device management, processors etc.
    Complete Changelog: https://github.com/Unity-Technologi...p/Packages/com.unity.inputsystem/CHANGELOG.md

    This version will become the recommended version for all supported Unity versions down to 2020.3 but it won't show up in the package manager as such just yet. You can however add it via the manifest file in your project.
     
    Last edited: Aug 8, 2022
  2. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    319
    I upgraded and now my Keyboard WASD (Movement) doesn't work (everything else seems fine, gamepad Movement works)

    upload_2022-7-9_19-17-13.png

    I read the value like this:
    ....Movement.ReadValue<Vector2>();

    Is there something new I must change?
     
  3. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,042
    Could you be so kind and report this via the bug reporter and attach the project so we can go through the upgrade internally? If so please ping the case ID here so we can get it out of the incoming queue :)

    Meaning there shouldn't be any changes to how keyboard works.
     
    jukibom likes this.
  4. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    319
    No, I won't, I think you confusing me for your testing department. I'm your paying client.

    Sorry if it sounds a bit harsh but the bugs that I have to deal with coming out from Unity lately makes it obvious you have no testers and barely test yourselves. The last bug I reported a few days ago was that the left motor on the PlayStation gamepad doesn't work, another perfect example of no testing been performed.

    It's incredible time consuming when we come across a bug, because we have to first double check everything ourselves to try work out why it isn't working or what exactly isn't working. Then we have to post on the forums and/or submit a bug which means creating a new project to re-create the bug so that we can upload the project so that you guys can verify and fix it.

    I'm sure you guys are capable of testing this out yourselves from the info I have supplied here and realize this is high enough priority that you should do that yourselves ASAP... you know because it's keyboard input for movement something the majority of PC games use.
     
  5. ccfoo242

    ccfoo242

    Joined:
    Oct 9, 2014
    Posts:
    80
    Lol good luck getting that prioritized... o_O
     
    zumwalt and jukibom like this.
  6. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,042
    We did indeed not see such an issue when upgrade testing internally and am sorry for your troubles. We went back and looked again, used a different project that after the upgrades does throw an error for keyboard use, but the keyboard controls are still functional.
    We'll look into that but are not sure if that will fix what you are seeing in your project.
     
  7. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    319
    Ok thanks, let me know once you fixed that bug and it's out and I'll test it out again.
     
  8. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,354
    @Schubkraft

    On a project with Unity 2020.3.36f1 I can update the Inputsystem to 1.4.1.
    But on Unity 2021.3.2f1 I cant seem to select the 1.4.1 version. There is no way to "See other versions" and select it, I only can use and set the 1.3.0 version (attached screenshot).
    Am I missing something or is this a package manager bug?

    InputSystemIssue.png
     
  9. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,042
    The changes to the recommended/available versions are not landing in order of Unity releases. You can add the package if you want to by changing the version number in the manifest file under Packages folder in your project for all Unity versions though.
     
  10. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,354
    But in which order (if in any) do they land? My (maybe naive) assumption was that as long as a package is compatible with a Unity release, the version will show up in the package manager?
     
  11. Jasozz

    Jasozz

    Joined:
    Oct 15, 2014
    Posts:
    13
    @Schubkraft

    I mentioned this in another thread weeks ago, but I too am experiencing this issue. WASD input breaks completely for me when upgrading to 1.4.1. Everything else seems to work fine.

    What's really interesting is that this is EXCLUSIVE to WASD. If I rebind my movement keys to anything other than WASD (like YGHJ or arrow keys) it works just fine. If I move it over to RDFG, then only "D" fails to work consistently - so there's definitely something specific about WASD that's causing the issue.

    My project is too large to upload as an example, but I actually fetch WASD input completely differently than @SniperED007 - I just directly poll whether the key is pressed or not.

    Code (CSharp):
    1.                 kbmMove = new Vector2(System.Convert.ToInt32(buttonIsDown("Strafe Right")) - System.Convert.ToInt32(buttonIsDown("Strafe Left")), System.Convert.ToInt32(buttonIsDown("Forward")) - System.Convert.ToInt32(buttonIsDown("Backward")));
    2.  
    Here's the "buttonIsDown" function referred to here:

    Code (CSharp):
    1.     public bool buttonIsDown(string inputName)
    2.     {
    3.         bool foundKey = false;
    4.         InputAction targetAction = playerControls.FindAction(inputName);
    5.         if (targetAction != null)
    6.         {
    7.             {
    8.                 if (targetAction.IsPressed())
    9.                 {
    10.                     return true;
    11.                 }
    12.                 else { return false; }
    13.             }
    14.         }
    15.         return false;
    16.     }
    ... and the Forward/Backward/etc. Input Actions are just simple button presses, not hybrid inputs or anything. Perhaps a bit primitive, but this allowed me to tie the Input System into my custom one I used to use without rewriting my entire game's input.

    EDIT -

    Wanted to include a snapshot of my Input Action Map just to show that there's no other movement binds for WASD, such as a hybrid input, that might be overlapping and causing issues. The only dedicated movement binding other than the Forward/Backward/etc. is an axis reading for Gamepad Left Stick.



    EDIT PART 2 -

    Just to eliminate another culprit, I replaced my default binds in the Input Action Map with YGHJ instead of WASD. Once in-game, YGHJ worked fine, but if I rebound the keys back to WASD (using PerformInteractiveRebinding and overriding), the issue returned. Definitely seems to be very specific to WASD.
     
    Last edited: Jul 14, 2022
  12. Vincent_LKB

    Vincent_LKB

    Joined:
    Apr 15, 2022
    Posts:
    5
  13. TheBlindEye

    TheBlindEye

    Joined:
    Feb 9, 2019
    Posts:
    3
    Upgraded too to 1.4.1 and my WASD keys don't work as well. Also, I tested on older versions, where they work as intended, and even on a clean just made project.
     
  14. WeiTinYuen

    WeiTinYuen

    Joined:
    Mar 27, 2019
    Posts:
    8
    After upgrading from 1.3.0 to 1.4.1, I noticed my OneModifierComposite stopped working. I tested a bit more and found Left Ctrl/Alt doesn't work with any of the Mouse buttons. Right Ctrl/Alt is fine though. It works in a fresh project, so this is only an issue with my project. One of my settings must be wrong, any clue what could've changed in the upgrade?
     

    Attached Files:

    Roman-Ilyin likes this.
  15. WeiTinYuen

    WeiTinYuen

    Joined:
    Mar 27, 2019
    Posts:
    8
    I did some more testing and noticed my issue is caused by having the same Composite Binding on multiple actions, only one action will receive input, which matches the new feature in 1.4.1 "Added support for keyboard shortcuts and mutually exclusive use of modifiers". However the included feature toggle isn't working for me.

    InputSystem.settings.SetInternalFeatureFlag("DISABLE_SHORTCUT_SUPPORT", true);
     
    rubendariohh and Roman-Ilyin like this.
  16. Magnesium

    Magnesium

    Joined:
    Sep 14, 2014
    Posts:
    168
    Could we get some clarification about the changes in Input system 1.4.1? I am indeed having issue with keyboard movements set to wasd. In version 1.3, i could use wasd but could not bind A and D in the user menu. With version 1.4.1, in can bind them but not use them. I don't think it's a bug, it probably just behaves differently.

    Here is how i set it up to move my character with wasd, arrows, gamepad joystick and d-pad, but i might be doing it wrong:

    upload_2022-7-23_15-30-31.png

    I can give access to my Github to Unity team members if needed.
     
    Last edited: Jul 23, 2022
    Jasozz likes this.
  17. blackmodjo

    blackmodjo

    Joined:
    May 6, 2014
    Posts:
    13
    #

    change and use Rewired package, at least it works
     
    GWLPXL likes this.
  18. tobspr_games

    tobspr_games

    Joined:
    May 20, 2022
    Posts:
    1
    I was actually running in the same issue - the WASD keys are not working anymore. I was able to fix it by changing the order of action maps:

    If the "UI" action map is first, the "Move" event doesn't fire. If I move the "UI" action map to the bottom, after my own maps, it does.
    I was not able to reproduce it in a minimal project though. But maybe somebody with the same issue can try this workaround and confirm it.
     
  19. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,042
    We're still looking into the regression of 1.4.1. Very sorry for this to happen, but for now the workaround is to not upgrade until we can fix these things :(
     
  20. Magnesium

    Magnesium

    Joined:
    Sep 14, 2014
    Posts:
    168
    I can understand that fixing bugs takes work but i hope it's kinda high in the todo list.

    Reverting back to previous version does not help a lot since i cannot assign A and D. It works for testing, but i could not release the game to the public if i wanted. Or maybe i should revert to an even earlier version? What is the latest known functional version of the package?
     
  21. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    319
    1.3 works. It's sad that it's been practically a month since I reported it and there still isn't a fix.
    This release is also holding up the next release which has another fix I'm waiting for which is the left motor not working on PlayStation controllers.
    This is why Unity needs internal testers to test functionality before releasing it.
     
    rubendariohh and fullerfusion like this.
  22. Magnesium

    Magnesium

    Joined:
    Sep 14, 2014
    Posts:
    168
    Well... it doesn't work for me. I can't let the user assign A and D to left and right. It works, because those are the default inputs, but if the user tries to change it and reassign A or D, nothing happens. But maybe i'm doing something wrong, here's my code:

    Code (CSharp):
    1. private void RebindKey(InputAction inputAction, int index)
    2.         {
    3.             inputAction.Disable();
    4.  
    5.             inputAction.PerformInteractiveRebinding(index)
    6.                 .WithControlsHavingToMatchPath("<Keyboard>")
    7.                 .WithCancelingThrough("<Keyboard>/escape")
    8.                 .WithControlsExcluding("<Keyboard>/upArrow")
    9.                 .WithControlsExcluding("<Keyboard>/downArrow")
    10.                 .WithControlsExcluding("<Keyboard>/leftArrow")
    11.                 .WithControlsExcluding("<Keyboard>/rightArrow")
    12.                 .WithControlsExcluding("<Keyboard>/anyKey")
    13.                 .WithBindingGroup("Keyboard")
    14.                 .OnCancel(operation =>
    15.                 {
    16.                     operation.Dispose();
    17.                     inputAction.Enable();
    18.                 })
    19.                 .OnComplete(operation =>
    20.                 {
    21.                     operation.Dispose();
    22.                     inputAction.Enable();
    23.                     GameManager.settingsManager.inputBindings.SaveBind(inputAction, index);
    24.                 })
    25.                 .Start();
    26.         }
    And like i said, in 1.4.1 it's the contrary, user can rebind those keys but can't use them.
     
  23. Junohea

    Junohea

    Joined:
    Jul 17, 2020
    Posts:
    1
    We're having the same problem, WASD is now broken with 1.4.1
    Ended up getting a specific instance in which WASD worked though, noting it here if it helps troubleshoot.

    Some context:
    This is what my Action Map looks like
    - "Move" was already there by default (cant recall why or what package sorry)
    - "LeftControl" was what i had added and was working off of
    - the actions "LeftControls" and "Move" are configured exactly the same, as are all the values nested under them.


    Calling the "Move" action will work, "LeftControls" will not
    Duplicating "Move" and using the duplicate (Move1) will not work

    Sample of the code used
    Code (CSharp):
    1.  
    2.         private ActionMap _playerActions;
    3.  
    4.         void Start()
    5.         {
    6.             _playerActions = new ActionMap();
    7.             _playerActions.Player.Enable();
    8.         }
    9. var x = _playerActions.Player.Move.ReadValue<Vector2>();
    10.  
    Let me know if I can provide any other data/files
     
    mahdi_jeddi likes this.
  24. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    319
    Probably shouldn't have released it then as part of Unity 2021.3.8f1 today.
     
  25. RoyBarina

    RoyBarina

    Joined:
    Jul 3, 2017
    Posts:
    77
    I just upgraded from 1.2 to 1.4.1 and also noticed WASD issues but I think there's a collision with my UI actions, they also uses WASD and as soon as I disable them, the "player actions" WASD works again. When I re-enable UI actions, player actions stopped working.. it looks like just a simple collision. is this intended? or should we take care of enabling\disabling UI and game actions accordingly?
     
  26. randyleemaitland

    randyleemaitland

    Joined:
    Nov 25, 2020
    Posts:
    4
    Composite bindings aren't working in the new update. Or for instance in my dash--if I'm holding down the dash key and trying to input directions with WASD--which used to work fine--doesn't register anymore. Kinda odd that this was released with these pretty glaring issues.
     
  27. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    216
    WASD didn't work for me either; changing the input layout back and forth fixes it. But then I found huge 300ms stutters when hitting any button. So I guess for now I'm going to go back to previous version.
     
  28. pzolla

    pzolla

    Joined:
    Apr 21, 2020
    Posts:
    9
    Right Button [Mouse] stopped working for me yet WASD was fine. I rolled back to 1.3 and everything works fine as it has for quite some time.
     
  29. Roman-Ilyin

    Roman-Ilyin

    Joined:
    Oct 9, 2013
    Posts:
    25
    The wasd starts working again if you move the gamepad stick attached to the same actions. Perhaps this will help fix the bug.
     
    minsumandoo likes this.
  30. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    379
    Ye WASD broken here too, seems like it wasn't ready to be released, best to downgrade I guess
     
  31. fullerfusion

    fullerfusion

    Joined:
    Dec 2, 2018
    Posts:
    17
    Using WASD no longer works with version 1.4.1.

    Is there anyway to downgrade to the previous version of the Input System without having to downgrade from 2021.3.8f1 LTS? Hopefully they release a regression version soon.
     
  32. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    777
    Whew I'm relieved I'm not the only one with nonworking WASD controls in 1.4.1
     
  33. namcap

    namcap

    Joined:
    Jan 8, 2016
    Posts:
    37
    I'm having the same problem after upgrading. I have both WASD and arrow keys bound to the same controls, and if I hold down the keys at the same time (e.g. W and up-arrow) then the keys work. If I hold down either one individually, they don't work. Prior to upgrading, they both worked individually. I haven't made any changes to my InputController settings between versions.
     
  34. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,042
    You can downgrade by just editing your manifest.json file and change the version from 1.4.1 to 1.3.0.
     
  35. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    319
    Any news about when the fix is coming, it's been over a month now.
    I would have thought this would be super high priority.
     
    rubendariohh likes this.
  36. Magnesium

    Magnesium

    Joined:
    Sep 14, 2014
    Posts:
    168
    Most of their devs are probably on holiday right now.
     
    Last edited: Aug 12, 2022
  37. vitamincpp

    vitamincpp

    Joined:
    Mar 21, 2018
    Posts:
    14
    Interestingly WASD works for me if I disable the "InputSystemUIInputModule" component of my event manager.
     
    Last edited: Aug 13, 2022
  38. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,210
    You guys don't have arrow keys?
    download.jpeg
     
  39. cp-

    cp-

    Joined:
    Mar 29, 2018
    Posts:
    66
    For me, 1.4.1 breaks Press interactions in combination with Gamepad triggers (see screenshots). Can't seem to fix it.
    upload_2022-8-15_10-34-44.png upload_2022-8-15_10-34-4.png

    Downgrade to 1.3.0 and everything is fine again.
     
  40. xsound

    xsound

    Joined:
    Dec 1, 2012
    Posts:
    1
    Same here. 1.4.1 is also throwing error when stopping game in the editor after updating to 2021.3.8f1:
    Code (CSharp):
    1. Type of instance in array does not match expected type
    2. UnityEngine.InputSystem.PlayerInput:OnDisable () (at Library/PackageCache/com.unity.inputsystem@1.4.1/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1735)
     
    Last edited: Aug 20, 2022
    goldbug likes this.
  41. JauntyBearGames

    JauntyBearGames

    Joined:
    Mar 26, 2018
    Posts:
    57
  42. Magnesium

    Magnesium

    Joined:
    Sep 14, 2014
    Posts:
    168
    I'm using both... left works for some reason, it's the only one.
     
  43. celeronpm

    celeronpm

    Joined:
    Feb 15, 2017
    Posts:
    11
    WASD works if you hold down all of the arrow keys at the same time. Perhaps someone confused || and && ;)

    Still, very frustrating to ship a release, have my community file a bug, waste hours trying to find the issue, finally Google it to land here and see it has been known for a while yet there are no in editor warnings, rollbacks, or anything.

    My team also reported another bug in the latest editor, I really wish Unity had proper regressions so it doesn't fall on us to have to test every release for basic functionality.
     
  44. unity_hakan

    unity_hakan

    Unity Technologies

    Joined:
    Jun 23, 2021
    Posts:
    4
    Hi and thanks for reporting the issues about WASD keys not working for your setup.

    This behavior is related to the keyboard shortcut fix in v1.4.1.
    From the CHANGELOG.md:

    "Added support for keyboard shortcuts and mutually exclusive use of modifiers.
    In short, this means that a "Shift+B" binding can now prevent a "B" binding from triggering.
    OneModifierComposite, TwoModifiersComposite, as well as the legacy ButtonWithOneModifierComposite and ButtonWithTwoModifiersComposite now require their modifiers to be pressed before (or at least simultaneously with) pressing the target button.
    This check is performed only if the target is a button. For a binding such as "CTRL+MouseDelta" the check is bypassed. It can also be manually bypassed via the overrideModifiersNeedToBePressedFirst.
    State change monitors on a device (IInputStateChangeMonitor) are now sorted by their monitorIndex and will trigger in that order.
    Actions are now automatically arranging their bindings to trigger in the order of decreasing "complexity". This metric is derived automatically. The more complex a composite a binding is part of, the higher its complexity. So, "Shift+B" has a higher "complexity" than just "B".
    If an binding of higher complexity "consumes" a given input, all bindings waiting to consume the same input will automatically get skipped. So, if a "Shift+B" binding composite consumes a "B" key press, a binding to "B" that is waiting in line will get skipped and not see the key press.
    If your project is broken by these changes, you can disable the new behaviors via a feature toggle in code:
    InputSystem.settings.SetInternalFeatureFlag("DISABLE_SHORTCUT_SUPPORT", true);"


    Due to the above change, having multiple actions bound to the same controls active at the same time could now come into conflict, with one of them "consuming" the input.
    In this case there might be other Input Actions enabled within the Input Action Asset also using the WASD keys in a composite binding.
    For instance if there is a 'UI' Action Map and that is also using the WASD keys for the Navigate Action.

    A solution for this case could be to disable any Action Maps which contain duplicate controls when not in use or change/delete any Actions with conflicting controls bound to them.
    There is also the feature flag to disable the new shortcut behaviour:

    Code (CSharp):
    1. InputSystem.settings.SetInternalFeatureFlag("DISABLE_SHORTCUT_SUPPORT", true);
    In the meantime the team is looking into different ways that we can improve this behavior, making it more intuitive and configurable while still being able to keep the shortcut key support as that was a heavily requested feature.
    We will keep you posted.
     
  45. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    319
    Might be worth releasing v1.4.2 with shortcut support turned off by default and rather include this flag to turn it ON until a better solution has been found:
    Code (CSharp):
    1. InputSystem.settings.SetInternalFeatureFlag("ENABLE_SHORTCUT_SUPPORT", true);
     
  46. Magnesium

    Magnesium

    Joined:
    Sep 14, 2014
    Posts:
    168
    You are right, disabling my UI bindings which also use those keys seems to fix it. Is this a bug or a feature though? It's going to be pretty inconvenient to rewrite the whole game to enabled/disable input action groups.
     
  47. ibernd

    ibernd

    Joined:
    Jun 24, 2019
    Posts:
    15
    After the update, I noticed that bindings used in 2DVectors no longer work as button actions. (here: While up arrow is used in the 2D Vector "ButtonAction" is no longer fired, "Vector2Action" does).


    Screenshot 2022-08-17 161324.png
     
    rubendariohh likes this.
  48. unity_hakan

    unity_hakan

    Unity Technologies

    Joined:
    Jun 23, 2021
    Posts:
    4
    @SniperED007 Thanks for the suggestion, 1.4.2 is already in flight with some other critical quality improvements, but we will consider this for the following release.
     
    MousePods and RoyBarina like this.
  49. Nanomid

    Nanomid

    Joined:
    Nov 8, 2014
    Posts:
    14
    I'd like to try the InputSystem, but it doesn't work. Version 2022.2.0b4.2768
    Following a simple tutorial, after adding Player Input and "Clicking Actions" I get an error from the InputSystem.Editor.



    InvalidOperationException: Failed to add object of type `InputActionAsset`. Check that the definition is in a file of the same name and that it compiles properly.
    UnityEngine.InputSystem.Editor.InputActionImporter.OnImportAsset (UnityEditor.AssetImporters.AssetImportContext ctx) (at Library/PackageCache/com.unity.inputsystem@1.4.2/InputSystem/Editor/AssetImporter/InputActionImporter.cs:95)
    UnityEditor.AssetImporters.ScriptedImporter.GenerateAssetData (UnityEditor.AssetImporters.AssetImportContext ctx) (at <f410fc5435e441ef807a07ba817c3e30>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     
    ashtorak likes this.
  50. Nanomid

    Nanomid

    Joined:
    Nov 8, 2014
    Posts:
    14
    Additionally, all of my devices are "Unsupported" in the Input Debugger.
    upload_2022-8-21_21-57-1.png