1.0.0-preview.5 #
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
, andInputAction.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 (likePress
orHold
). - This made for unpredictable and frequently surprising results. In addition, it led to bugs where, for example, adding a
Press
interaction to theClick
action ofInputSystemUIInputModule
would cause the click state to get stuck because the click action would never cancel.
- There were no enforced rules about how an action would go through
- 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 withInputAction.started
, if this isn't done explicitly, it will happen implicitly. This implies thatInputAction.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
andInputAction.canceled
,InputAction.performed
may be triggered arbitrary many times (including not at all).
- The system will now always trigger
- 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.
- This is a breaking change!
- 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 amode
parameter which can be used to choose betweenDigitalNormalized
(the default),Digital
(same asDigitalNormalized
but does not normalize the resulting vector), andAnalog
(uses float input values as is).Vector2Composite.normalize
has been deprecated. Note that it will not work together withAnalog
. 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
andTouch
. - 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 samePlayerInput
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
whenInvoke Unity Events
is selected inPlayerInput
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.
- The sample contains a reusable
- Added a
Deselect On Background Click
option toInputSystemUIInputModule
. This allows toggling the behavior off where clicking the mouse and not hitting aGameObject
will automatically clear the current selection -- which will break keyboard and gamepad navigation.