Search Unity

Official Input System 1.5.0 released

Discussion in 'Input System' started by Schubkraft, Feb 9, 2023.

  1. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,071
    Hello Input System users!

    We released version 1.5.0 of the package, which primarily focuses on opt-in performance optimizations and bug fixes:
    • We improved performance of 'InputControl.ReadValue'/'InputControl.WriteValueIntoState' when values change for some control types. Please call 'InputSystem.settings.SetInternalFeatureFlag("USE_OPTIMIZED_CONTROLS", true);' in your project to enable it. You can observe which controls are optimized by looking at new optimized column in device debugger. This change is opt-in due to change in behavior, as now a new method 'InputControl.ApplyParameterChanges()' needs to be called if the code is changing 'AxisControl' fields after initial setup is done. See the specific docs for more info.
    • We also improved performance of 'InputControl.ReadValue' when values don't change by caching control values. Please call 'InputSystem.settings.SetInternalFeatureFlag("USE_READ_VALUE_CACHING", true);' in your project to enable it. This change is opt-in due to processors not being re-applied if values don't change. If there are any issues please use 'InputSystem.settings.SetInternalFeatureFlag("PARANOID_READ_VALUE_CACHING_CHECKS", true);' to try troubleshoot them. See this doc for more info.
    • 'OnScreenStick' was reworked based on the PR from eblabs by adding new modes to enable moving whole stick to the start position, and closely following the finger.

    Some highlights for the bug fixes:
    • Fixed Switch Pro, DualShock 4, DualSense gamepads becoming current on PC/macOS when no controls are changing.
    • Fixed input events were being suppressed during interactive action rebinding even when when their controls were excluded.
    • Fixed an issue that made OnScreenStick unusable when used in conjunction with PlayerInput in Auto-Switch devices mode.

    Input system 1.5.0 is available starting from:
    • 2020.3.45f1
    • 2021.3.19f1
    • 2022.2.6f1
    • 2023.1.0b3

    Or alternatively you can manually specify "1.5.0" in your manifest.json.

    And if it's your first time hearing about input system you can find an introduction in the manual.
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,043
    X3doll, florianBrn and rdjadu like this.
  3. Kleptine

    Kleptine

    Joined:
    Dec 23, 2013
    Posts:
    282
    Just wanted to say I appreciate you all keeping the package public on Github! It's really nice to be able to see all the work you're doing.

    The Input System is a fantastic system, glad to see the updates!
     
    rdjadu and DevDunk like this.
  4. Meorge

    Meorge

    Joined:
    Feb 10, 2017
    Posts:
    21
    Are there plans to add support for haptics for Xbox, PS4, and Switch Pro controllers on macOS? I can see that macOS supports them natively - connecting them to my Mac and then pressing "Identify" will make them vibrate - so system support shouldn't be an issue.
     
    zt3ff3n likes this.
  5. szamilMST

    szamilMST

    Joined:
    Mar 2, 2020
    Posts:
    12
  6. gg_michael

    gg_michael

    Joined:
    Sep 24, 2012
    Posts:
    73
    This update broke the MultiplayerEventSystem for me. As in, the class itself doesn't compile (can't be added as a component) and any prefabs that had the component are borked. Any ideas? (This came from updating the proj to 2022.2.6 - manually downgrading the input package to 1.4.4 fixes it)
     
  7. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,043
    For my VR project the opt in optimizations make it slower in editor. Haven't tested in build
     
  8. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,071
    I tried this locally and can't repro this myself. Could you be so nice and make it a report report via the Unity editor and attach your project or another repro project that shows the bug you are hitting?
    Thank you!
     
  9. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,043
    Performed a lot worse for me in VR (input took up to 5x with optimizations compared to without with standalone VR).
    Bug report made: IN-33567
     
    Schubkraft likes this.
  10. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,071
    Looking into this is in our backlog. We don't know when we get to this though. Sorry.
     
    Meorge likes this.
  11. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,071
    Hello,
    MultiScreenUI is tricky to solve for us alone. Solving this properly involves several teams at Unity but I can't say when we'll get around to that. Sorry.
     
  12. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,071
    Thanks for the bug report!
     
    DevDunk likes this.
  13. Meorge

    Meorge

    Joined:
    Feb 10, 2017
    Posts:
    21
    Great, thanks for the reply/info! :)
     
  14. TomTheMan59

    TomTheMan59

    Joined:
    Mar 8, 2021
    Posts:
    356
  15. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,071
  16. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,043
  17. TomTheMan59

    TomTheMan59

    Joined:
    Mar 8, 2021
    Posts:
    356
    O well. I was looking for a solution where I have an action that uses gamepads and I need A on the Switch pro controller to trigger BUT I need South on all other gamepads to trigger but not on the switch pro controller. I don't want to duplicate all actions just for the switch.

    I was hoping to use that to stop this issue. Is there not an official solution?
     
  18. Arycama

    Arycama

    Joined:
    May 25, 2014
    Posts:
    184
    Looks good, but why do the changes have to be enabled by some strange string-based feature flags system which literally nothing else in Unity uses, and requires you to write a script that gets executed every time your game runs? Why not have a scriptable object based configuration file with tickboxes, or some options in project settings to keep it consistent with every other system in Unity? Making things like this obscure hurts discoverability and unless someone sees this thread specifically they're probably never going to discover it. It seems like almost every new Unity feature or package uses a completely different approach to configuring itself. (Eg HDRP, URP, Input System) Why not unify all settings to use a common approach?

    Personally I don't understand why you wouldn't just want these optimisations/caching enabled all the time. What advantages are there to leaving them disabled?
     
    ontrigger, florianBrn and Shizola like this.
  19. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,043
    Right now vr performance suffers with the optimizations, and maybe some other platforms.
    I do agree why it can't just be a checkbox in a scriptable object or just in the input system settings in project settings
     
  20. jonkelling

    jonkelling

    Joined:
    Dec 18, 2019
    Posts:
    21
    Updated to 1.5.0 by updating Unity from 2022.2.2f1 to 2022.2.8f1. Can no longer view .inputactions files along with the following errors:
    Code (CSharp):
    1. InvalidOperationException: Failed to add object of type `InputActionReference`. Check that the definition is in a file of the same name and that it compiles properly.
    2. UnityEngine.InputSystem.Editor.InputActionImporter.OnImportAsset (UnityEditor.AssetImporters.AssetImportContext ctx) (at ./Library/PackageCache/com.unity.inputsystem@1.5.0/InputSystem/Editor/AssetImporter/InputActionImporter.cs:130)
    3.  
    4. Asset import failed, "Assets/InputMaster.inputactions" > InvalidOperationException: Failed to add object of type `InputActionReference`. Check that the definition is in a file of the same name and that it compiles properly.
    5.  
    This applies to all existing .inputactions files and any new ones I create. Downgrading to 1.4.4 fixes it for now.
     
  21. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,071
    A bug report with that project would be really appreciated. Thank you!
     
  22. Francoimora

    Francoimora

    Joined:
    Aug 1, 2013
    Posts:
    68
    Last edited: Mar 2, 2023
  23. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Hi @Schubkraft. Any plan to start working on making all Input System APIs burst and job compatible very soon specifically for mobile platform i.e Android and iOS to better support dots project? Currently at android platform I get 2ms+ just for input which is insanely slow caused by input can't schedule as job. I hope the APIs can support both burst and job but if can't yet at least make it able to schedule as job.
     
  24. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,071
    It is not on our short term plan, sorry.
     
    optimise likes this.
  25. szamilMST

    szamilMST

    Joined:
    Mar 2, 2020
    Posts:
    12
  26. zt3ff3n

    zt3ff3n

    Joined:
    Feb 19, 2016
    Posts:
    37
    Just want to make sure I'm getting this right.
    Games built with the new input system will not have haptics on ARM/Silcon based Macs?
    And that this shortcoming is not really on your to-do list?
     
  27. Takkun1157

    Takkun1157

    Joined:
    Oct 2, 2022
    Posts:
    2
    Please help!!!
    I have had my On-screen stick working without any problems until now. However, in the last few days, the stick that complements the On-screen stick suddenly stopped working, and when I disable InputSystem in Inspector, it works fine.
    Then I upgraded to 2022.2.6f1 and set InputSystem to 1.50. However, I still have the same problem.
    How can I improve it? I would like to know.
     
  28. baize97

    baize97

    Joined:
    Jun 23, 2020
    Posts:
    30
    @Schubkraft Hi,I have a basic problem.
    Suppose the shortcut key of function A is Alt+K, and the shortcut key of function B is K. When I press Alt+K, both functions A and B are triggered. How can I avoid this situation?
     
  29. Francoimora

    Francoimora

    Joined:
    Aug 1, 2013
    Posts:
    68
  30. chemicalcrux

    chemicalcrux

    Joined:
    Mar 16, 2017
    Posts:
    720
    You need to enable this guy in Project Settings -> Input System Package

    upload_2023-4-7_13-42-35.png

    It's not on by default. When enabled, the most complex action will win.
     
  31. pastaluego

    pastaluego

    Joined:
    Mar 30, 2017
    Posts:
    196
    Is it true that there is another revamp of the new Input System happening behind the scenes for over a year now? If it is true, is there any info on that, or has it already been merged into 1.5, or is it just a baseless rumor?
     
  32. lyndon_unity

    lyndon_unity

    Unity Technologies

    Joined:
    Nov 2, 2017
    Posts:
    66
    The team are actively working on improvements to the new input system with regard to workflows, API updates, performance enhancement etc but this is evolutionary and not a rewrite.
     
    mariandev likes this.
  33. FellowPlayer123

    FellowPlayer123

    Joined:
    Dec 23, 2016
    Posts:
    114
    Doesn't work.

    New Input system + UI + Split Screen.

    UI navigation doesn't work when the second player joins.

    Unity Version: 2022.3.0f1 LTS.
     
  34. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,071
    We'd be interested in getting a bug report form you with that repro project so we can investigate. Thank you!
     
  35. FellowPlayer123

    FellowPlayer123

    Joined:
    Dec 23, 2016
    Posts:
    114
    Bug report form - where is it, how to report it? I don't have time for this. I don't have time for this.

    I report here and you should handle it.

    When the second player joins in the split screen mode, he is not able to navigate in UI with the d-pad.

    I tested in on multiple unity versions, multiple PC with different xbox gamepads.

    Multiplayer event system -> first selected is selected to the first button, the the root to player canvas.

    It only works for single user.
     
    Last edited: Jun 7, 2023
  36. FellowPlayer123

    FellowPlayer123

    Joined:
    Dec 23, 2016
    Posts:
    114
    Multiplayer event system - UI navigation doesn't work with Xbox gamepad. I tested it on multiple Unity version, on different PCs, with different Xbox gamepad. Issue always the same.

    Only when I set to explicit it works, but it is the floppy design. I populate the list with buttons dynamically and there a multiple of them. IT SHOULD WORK AUTOMATICLY JUST LIKE WITH THE KEYBOARD.