1.1.0-pre.6 #
Fixed
Added
Changed
Fixed
- Fixed pairing devices to existing
InputUser
s potentially corrupting list of paired devices from otherInputUser
s (case 1327628). - Fixed duplication of control paths when viewing collections of
InputControl
s in the inspector.- Fix contributed by NibbleByte in 1354.
- Fixed
StackOverflowException
caused by callingInputSystem.Update
from inside an input action callback such asInputAction.performed
(case 1316000). - Fixed
InputTestFixture
leaving all.current
getters uninitialized after a test run (case 1329015). - Fixed broken script references in Touch Samples project (case 1190598).
- Fixed
PointerInput
composite inTouchSamples
project being registered only after scenes already loaded (case 1215048). - Fixed
InputControlExtensions.EnumerateChangedControls
skipping overleft
,right
, anddown
controls on PS4 controller's dpad (case 1315107). - Fixed undo not working in
Input System Package
project settings pane (case 1291709). - Fixed incorrect indexing in
InputUser.OnDeviceChanged
that could result in incorrect pairing of devices orIndexOutOfRangeException
being thrown when removing, adding or reconfiguring a device. Fix contribution by Mikael Klages in #1359. - Fixed incorrect indexing when sorting magnitude based on score in
InputActionRebindingExtensions.RebindingOperation
which could result in incorrect magnitudes for candidates. Contribution by Fredrik Ludvigsen in #1348. - Fixed inconsistent ordering and execution when adding to or removing from the various callbacks in the API (such as
InputSystem.onDeviceChange
but alsoInputAction.started
etc.) during the execution of a callback (case 1322530. - Fixed inconsistent behavior of WebGL gamepad left/right stick. Up/Down controls were reverse of X/Y controls. (case 1348959)
- Fixed
PlayerInputManager
s join action not triggering when using a referencedInputAction
(case 1260625). - Fixed UI issue where pressing the wrong button was possible while quickly moving through a UI because the submit action fired on action press instead of action release (1333563).
- Fixed InvalidOperationException when opening a preset created from a .inputactions asset (case 1199544).
- Fixed a problem arising when combining InputSystemUIInputModule and PlayInput with SendMessage or BroadcastMessage callback behavior on the same game object or hierarchy which is an ambiguous input setup. This fix eliminates callbacks into InputSystemUIInputModule. Related to (1343712).
- Fixed inconsistent usage of
ENABLE_PROFILER
define together withProfiler.BeginSample
/Profiler.EndSample
by removingENABLE_PROFILER
macro check becauseBeginSample
/EndSample
are already conditional with[Conditional("ENABLE_PROFILER")]
(case 1350139). - Remediated majority of performance issues with high frequency mice (>=1kHz poll rates) in release mode by merging consecutive mouse move events together (case 1281266), see the events documentation for more information.
- Fixed
InputEventTrace
replays skipping over empty frames and thus causing playback to happen too fast. - Fixed
"Pointer should have exited all objects before being removed"
error when changing screen orientation on mobile. - Controls such as mouse positions are no longer reset when focus is lost.
- Pressing a uGUI
Button
and then alt-tabbing away, letting go of the button, and then going back to the application will no longer trigger a button click. - Fixed
Input.onUnpairedDeviceActivity
triggering from editor input. - Fixed 'up' and 'down' controls on
WebGLGamepad
left and right sticks not being clamped correctly.
Actions
- Fixed right-clicking in empty action map or action list not popping up context menu (case 1336426).
- Fixed binding paths being misaligned in UI when switching to text mode editing (case 1200107).
- Fixed
"Exception: Style.Draw may not be called with GUIContent that is null."
error fromPlayerInput
inspector when having an action map with no actions (case 1317735). - Fixed calling
GetBindingDisplayString()
on anInputAction
with a composite binding leading to doubled up output (case 1321175). - Fixed
MultiTapInteraction
not respectingInputSettings.multiTapDelayTime
(case 1292754). - Fixed changing values in
Input System Package
project settings not affecting default values displayed in.inputactions
editor window (case 1292754). - Fixed rebinding a part of a composite with
RebindingOperation.WithTargetBinding
not also changing the type of control being looked for (case 1272563). - Fixed
AxisComposite
not respectingminValue
andmaxValue
properties (case 1335838). - Fixed
ArgumentOutOfRangeException
caused byIsPointerOverGameObject
(case 1337354). PlayerInput
no longer logs an error message when it is set toInvoke UnityEvents
and can't find an action in the given.inputactions
asset (case 1259577).- Fixed
HoldInteraction
getting stuck when hold and release happens in same event (case 1346786). - Fixed adding an action in the
.inputactions
editor automatically duplicating interactions and processors from the first action in the map. - Fixed
InputActionSetupExtensions.ChangeBinding
when modifying binding from a different action than specified. Contribution by Fredrik Ludvigsen in #1348.
Added
- Added
InputSystem.runUpdatesInEditMode
to enable processing of non-editor updates without entering playmode (only available for XR). - Added a new "UI vs Game Input" sample to the package. The sample can be installed from the Unity Package Manager UI in the editor.
- The sample demonstrates how to deal with inputs that may both lead to UI actions as well as in-game actions.
- Added method
SetMotorSpeedsAndLightBarColor
as a workaround for setting both the light bar and motor speeds simultaneously on a DualShock 4 controller (case 1271119). - Added the concept of "soft" and "hard" device resets.
- In general, resetting a device will reset its state to default values.
- Individual controls can be marked as
dontReset
to exclude them from resets. This makes the reset "soft" (default).// Perform a "soft" reset of the mouse. The mouse position will not be affected // but controls such as buttons will be reset. InputSystem.ResetDevice(Mouse.current);
- A "hard" reset can be forced through the API. This also resets
dontReset
controls.// Perform a "hard" reset of the mouse. The mouse position will also be reset to (0,0). InputSystem.ResetDevice(Mouse.current, alsoResetDontResetControls: true);
- Resets will lead to
InputAction
s that are enabled and in-progress from controls that being reset, to be canceled. This will not perform actions even if they trigger on, for example, button release.
InputDevice.canRunInBackground
can now be force-set through layouts.// Force XInputWindows gamepads to not run in the background. InputSystem.RegisterLayoutOverride(@" { ""name"": ""XInputWindowsNoCanRunInBackground"", ""extend"": ""XInputWindows"", ""runInBackground"": ""off"" } ");
- Improved performance of
Touchscreen
by merging consecutive touch move events together. See the events documentation for more information.
Actions
- Added a new
InputAction.wantsInitialStateCheck
property that allows toggling on initial state checks forButton
andPass-Through
actions (implicitly enabled forValue
actions).- This allows responding immediately to controls that are already actuated when the action is enabled.
- Added new API for more easily listening for event changes.
InputSystem.onEvent .ForDevice<Gamepad>() .Where(e => e.HasButtonPress()) .CallOnce(e => Debug.Log("Button pressed!));
- Added new API to easily listen for button presses on any device.
InputSystem.onAnyButtonPress .CallOnce(ctrl => Debug.Log($"Button '{ctrl}' pressed"));
- This is a simple wrapper around the new API mentioned above.
Changed
- Application focus handling behavior has been reworked.
- When
runInBackground
is off, no action will be taken on focus loss. When focus comes back, all devices will receive a sync request. Those that don't support it will see a "soft" reset. - When
runInBackground
is on (which, when running in the editor, is considered to always be the case), a new settingInputSettings.backgroundBehavior
dictates how input is to be handled while the application does not have focus. The default setting ofResetAndDisableNonBackgroundDevices
will soft-reset and disable all devices for whichInputDevice.canRunInBackground
is false. While in the background, devices that are flagged ascanRunInBackground
will keep running as in the foreground. - In the editor, devices other than
Pointer
andKeyboard
devices (i.e. anything not used to operate the editor UI) are now by default routing their input to the Game View regardless of focus. This also fixes the problem of gamepad sticks resetting to(0,0)
on focus loss (case 1222305). - A new setting
InputSettings.gameViewFocus
has been introduced to determine how Game View focused is handled in the editor with respect to input.
- When
- Editor: Removed 'Lock Input to Game View' setting in the Input Debugger.
- The setting has been replaced by the new 'Game View Focus' project setting.
InputSystem.defaultButtonPressPoint
is now clamped to a minimum value of0.0001
(case 1349002).InputDevice.OnConfigurationChanged
can now be overridden in derived classes.InputSystemUIInputModule
now defers removing pointers for touches by one frame.- This is to ensure that
IsPointerOverGameObject
can meaningfully be queried for touches that have happened within the frame – even if by the time the method is called, a touch has technically already ended (case 1347048). - More precisely, this means that whereas before a
PointerExit
andPointerUp
was received in the same frame, a touch will now see aPointerUp
in the frame of release but only see aPointerExit
in the subsequent frame.
- This is to ensure that
- Calling
EventSystem.IsPointerOverGameObject()
from withinInputAction
callbacks (such asInputAction.performed
) will now result in a warning.- UI updates after input and consumes input through
InputAction
s as they are processed. Thus, querying UI state from withinInputAction
callbacks will query outdated UI state.
- UI updates after input and consumes input through
- Changed
TrackedPoseDriver
to use properties of typeInputActionProperty
rather thanInputAction
to allow more flexibility. - Changed quickstart documentation sample to use the Update method instead of FixedUpdate to show a more correct usage of the
wasPressedThisFrame
API.