InputSystem Changelog

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

1.0.0-preview.5 #

14 Feb 2020

Changed
Fixed
Added

Changed

  • We've changed the rules that govern how action phases have to progress:
    • This is a breaking change!
      • The primary effect is additional callbacks getting triggered.
    • Before:
      • There were no enforced rules about how an action would go through InputAction.started, InputAction.performed, and InputAction.canceled. Which of the callbacks were triggered and in what order depended on a number of factors, the biggest influencer of which were the different interactions that could be applied to actions (like Press or Hold).
      • This made for unpredictable and frequently surprising results. In addition, it led to bugs where, for example, adding a Press interaction to the Click action of InputSystemUIInputModule would cause the click state to get stuck because the click action would never cancel.
    • Now:
      • The system will now always trigger InputAction.started first. If this is not done explicitly, it happens implicitly.
      • Likewise, the system will now always trigger InputAction.canceled before going back to waiting state. Like with InputAction.started, if this isn't done explicitly, it will happen implicitly. This implies that InputAction.canceled no longer signifies an action getting aborted because it stopped after it started but before it performed. It now simply means "the action has ended" whether it actually got performed or not.
      • In-between InputAction.started and InputAction.canceled, InputAction.performed may be triggered arbitrary many times (including not at all).
    • While late in the cycle for 1.0, we've opted to make this change now in order to fix a range of bugs and problems we've observed that people encountered because of the previous behavior of the system.
  • Related to the change above, the behavior of PressInteraction has been tweaked and now is the following:
    • Press Only: Starts and immediately performs when pressed, then stays performed and cancels when button is released.
    • Release Only: Starts when button is pressed and then performs and immediately cancels when the button is released.
    • Press And Release: Starts and immediately performs when button is pressed, then stays performed and performs again and immediately cancels when button is released.
  • Vector2Composite now has a mode parameter which can be used to choose between DigitalNormalized (the default), Digital (same as DigitalNormalized but does not normalize the resulting vector), and Analog (uses float input values as is).
    • Vector2Composite.normalize has been deprecated. Note that it will not work together with Analog. The parameter will be removed in the future.

Fixed

  • XR controllers and HMDs have proper display names in the UI again. This regressed in preview.4 such that all XR controllers were displayed as just "XR Controller" in the UI and all HMDs were displayed as "XR HMD".
  • InputSystemUIInputModule no longer generates GC heap garbage every time mouse events are processed.
  • Fixed a bug where an internal array helper method was corrupting array contents leading to bugs in both InputUser and Touch.
  • Fixed exception when saving changes to an Input Action asset and the parent directory has been renamed. (case 1207527)

Actions

  • The regression in 1.0.0-preview.4 of PlayerInputManager not joining players correctly if a scheme has more than one device requirement has been fixed.
    • This most notably manifested itself with keyboard+mouse control schemes.
  • PlayerInputManager will no longer join players when control schemes are used and none of the schemes produces a successful match based on the devices available for the join.
  • When no action map is selected in action editor, plus icon to add an action is now disabled; formerly threw an exception when clicked (case 1199562).
  • Removing a callback from actions from the callback itself no longer throws ArgumentOutOfRangeException (case 1192972).
  • "Invalid user" ArgumentException when turning the same PlayerInput on and off (case 1198889).
  • The list of device requirements for a control scheme in the action editor no longer displays devices with their internal layout name rather than their external display name.
  • StackOverflowException when Invoke Unity Events is selected in PlayerInput and it cannot find an action (#1033).
  • HoldInteraction now stays performed after timer has expired and cancels only on release of the control (case 1195498).
  • Foldouts in the various action UIs now properly toggle their expansion state when clicked in Unity 2019.3+ (case 1213781).

Added

  • We've added a new Simple Multiplayer sample which demonstrates a simple, bare-bones local multiplayer setup.
  • We've also added a Gamepad Mouse Cursor sample that shows how to drive a UI mouse cursor using the gamepad.
    • The sample contains a reusable VirtualMouseInput component that does most of the work.
  • Added a Deselect On Background Click option to InputSystemUIInputModule. This allows toggling the behavior off where clicking the mouse and not hitting a GameObject will automatically clear the current selection -- which will break keyboard and gamepad navigation.