Input System 1.5.0 released

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.

7 Likes

https://github.com/Unity-Technologies/InputSystem/pull/1578

When can this be merged? Been open for a while now

3 Likes

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!

2 Likes

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.

1 Like

Is the problem with multi screen UI going to be fixed?

https://discussions.unity.com/t/908154
https://discussions.unity.com/t/892973
https://discussions.unity.com/t/779719/9
https://forum.unity.com/threads/coordinate-problem-when-building-windows-stand-alone-by-connecting-multiple-touch-monitors.1396216/

1 Like

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)

For my VR project the opt in optimizations make it slower in editor. Haven't tested in build

[quote=“mStep”, post:6, topic: 908683]
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)
[/quote]

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!

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

1 Like

[quote=“Meorge”, post:4, topic: 908683]
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.
[/quote]

Looking into this is in our backlog. We don’t know when we get to this though. Sorry.

1 Like

[quote=“szamilMST”, post:5, topic: 908683]
Is the problem with multi screen UI going to be fixed?

https://discussions.unity.com/t/908154
https://discussions.unity.com/t/892973
https://discussions.unity.com/t/779719/9
https://forum.unity.com/threads/coordinate-problem-when-building-windows-stand-alone-by-connecting-multiple-touch-monitors.1396216/
[/quote]

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.

Thanks for the bug report!

1 Like

[quote=“Schubkraft”, post:10, topic: 908683]
Looking into this is in our backlog. We don’t know when we get to this though. Sorry.
[/quote]
Great, thanks for the reply/info! :slight_smile:

@Schubkraft Is this going to be fixed soon, sir? https://discussions.unity.com/t/795573

[quote=“TomTheMan59”, post:14, topic: 908683]
@Schubkraft Is this going to be fixed soon, sir? https://discussions.unity.com/t/795573
[/quote]

Sadly this is still in Postponed state. I don’t know when we get around to make a push for the action editor. Sorry.


Also provided more info on performance improvements

[quote=“Schubkraft”, post:15, topic: 908683]
Sadly this is still in Postponed state. I don’t know when we get around to make a push for the action editor. Sorry.
[/quote]

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?

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?

3 Likes

[quote=“Arycama”, post:18, topic: 908683]
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?
[/quote]
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

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:

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.
UnityEngine.InputSystem.Editor.InputActionImporter.OnImportAsset (UnityEditor.AssetImporters.AssetImportContext ctx) (at ./Library/PackageCache/com.unity.inputsystem@1.5.0/InputSystem/Editor/AssetImporter/InputActionImporter.cs:130)

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.

This applies to all existing .inputactions files and any new ones I create. Downgrading to 1.4.4 fixes it for now.