com.unity.inputsystem 1.1.0-preview.1

com.unity.inputsystem

Notes: processedReleased August 20, 2020

Browse versions

PreviousNext

Unity Compatibility

Minimum Unity: 2019.4

Package Dependencies

No dependency metadata provided.

📈 Improvements

  • #### Actions
  • Auto-generated C# files now have `` headers so they get ignored by Rider code analysis.
  • Auto-generated C# classes are now `partial` so that they can be manually extended.
  • Deleting a composite binding with `action.ChangeBinding(0).Erase()` now also erases all the bindings that are part of the composite.
  • Trigger binding resolution from within action callbacks (e.g. `InputAction.performed`) will now defer resolution until after the callback has completed.
  • - This fixes crashes such as case 1242406 where disabling `PlayerInput` from within an action callback led to an action's state being released while the action was still in a callback.

🔧 Bug Fixes

  • Fixed input history on Android mono build by alligning memory of history records
  • Fixed no input being processed when running a `[UnityTest]` over several frames. Before, this required calling `InputSystem.Update` manually.
  • Fixed clicking on help page button in Unity inspector for Input System components not going to relevant manual pages.
  • Fixed a bug that prevented DualShock controllers from working on tvOS. (case 1221223).
  • `GravitySensor`, `LinearAccelerationSensor`, and `AttitudeSensor` not being initialized on iOS (case 1251382).
  • Fixed compilation issues with XR and VR references when building to platforms that do not have complete XR and VR implementations.
  • Fixed possible `NullReferenceException`s on ARMs with controls that receive automatic memory offsets.
  • Fixed `TouchControl.tapCount` resetting to 0 when "Script Debugging" is enabled (case 1194636).
  • Fixed `Touch.activeTouches` not having a `TouchPhase.Began` entry for touches that moved in the same frame that they began in (case 1230656).
  • Fixed sequential taps causing touches to get stuck in `Touch.activeTouches`.
  • Improved performance of `Touch.activeTouches` (most notably, a lot of time was spent in endlessly repetitive safety checks).
  • Fixed `EnhancedTouch` APIs not indicating that they need to be enabled with `EnhancedTouchSupport.Enable()`.
  • - The APIs now throw `InvalidOperationException` when used without being enabled.
  • Fixed memory corruption in `InputEventTrace.AllocateEvent` (case 1262496)
  • - Manifested itself, for example, as crashes when using `InputActionTrace.SubscribeToAll`.
  • AxisControls and Vector2Controls' X and Y subcontrols on XR devices now have a minimum range of -1 and a maximum range of 1. This means they can now properly respond to modifiers and interactions in the binding system.
  • #### Actions
  • Fixed drag\&drop reordering actions while having one control scheme selected causing bindings from other control schemes to be lost (case 122800).
  • Fixed stack overflow in `PlayerInput.SwitchCurrentActionMap` when called from action callback (case 1232893).
  • Fixed control picker ending up empty when listing devices in "Supported Devices" (case 1254150).

Features

  • Device layouts can now be "precompiled" for speed. `Keyboard`, `Mouse`, and `Touchscreen` are now included as precompiled layouts greatly reducing instantiation time and GC heap cost for these devices. For `Touchscreen`, this results in a >20x speed-up for `InputSystem.AddDevice()`.
  • Added Pose Control layout. The Pose Control is used on XR Devices and wraps tracking state, position, rotation, and velocity information.
  • #### Actions
  • Can now save binding overrides as JSON strings and restore them from such using the newly added `SaveBindingOverridesAsJson` and `LoadBindingOverridesFromJson` extension methods.
  • ```CSharp
  • void SaveUserRebinds(PlayerInput player)
  • {
  • var rebinds = player.actions.SaveBindingOverridesAsJson();
  • PlayerPrefs.SetString("rebinds", rebinds);
  • }
  • void LoadUserRebinds(PlayerInput player)
  • {
  • var rebinds = PlayerPrefs.GetString("rebinds");
  • player.actions.LoadBindingOverridesFromJson(rebinds);
  • }
  • ```