InputSystem Changelog

This changelog showcases the ability to render changelogs in the "keep a changelog" format

1.1.0-preview.1 #

20 Aug 2020

Changed
Fixed
Added

The minimum version requirement for the Input System package has been moved up to 2019.4 LTS.

Changed

Actions

  • Auto-generated C# files now have <auto-generated> 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.

Fixed

  • 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 NullReferenceExceptions 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).

Added

  • 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<Touchscreen>().
  • 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.
    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);
    }