0.2.8-preview #
Added
Changed
Fixed
Added
- Added a
clickCount
control to theMouse
class, which specifies the click count for the last mouse click (to allow distinguishing between single-, double- and multi-clicks). - Support for Bluetooth Xbox One controllers on macOS.
Actions
- New API for changing bindings on actions
// Several variations exist that allow to look up bindings in various ways.
myAction.ChangeBindingWithPath("<Gamepad>/buttonSouth")
.WithPath("<Keyboard>/space");
// Can also replace the binding wholesale.
myAction.ChangeBindingWithPath("<Keyboard>/space")
.To(new InputBinding { ... });
// Can also remove bindings programmatically now.
myAction.ChangeBindingWithPath("<Keyboard>/space").Erase();
Changed
Joystick.axes
andJoystick.buttons
have been removed.- Generated wrapper code for Input Action Assets are now self-contained, generating all the data from code and not needing a reference to the asset;
InputActionAssetReference
has been removed. - The option to generate interfaces on wrappers has been removed, instead we always do this now.
- The option to generate events on wrappers has been removed, we felt that this no longer made sense.
- Will now show default values in Input Action inspector if no custom values for file path, class name or namespace have been provided.
InputSettings.runInBackground
has been removed. This should now be supported or not on a per-device level. Most devices never supported it in the first place, so a global setting did not seem to be useful.- Several new
Sensor
-based classes have been added. Various existing Android sensor implementations are now based on them. InputControlLayoutAttribute
is no longer inherited.- Rationale: A class marked as a layout will usually be registered using
RegisterLayout
. A class derived from it will usually be registered the same way. Because of layout inheritance, properties applied to the base class throughInputControlLayoutAttribute
will affect the subclass as intended. Not inheriting the attribute itself, however, now allows having properties such asisGenericTypeOfDevice
which should not be inherited.
- Rationale: A class marked as a layout will usually be registered using
- Removed
acceleration
,orientation
, andangularVelocity
controls fromDualShockGamepad
base class.- They are still on
DualShockGamepadPS4
. - The reason is that ATM we do not yet support these controls other than on the PS4. The previous setup pretended that these controls work when in fact they don't.
- They are still on
- Marking a control as noisy now also marks all child controls as noisy.
- The input system now defaults to ignoring any HID devices with usage types not known to map to game controllers. You can use
HIDSupport.supportedUsages
to enable specific usage types. - In the Input Settings window, asset selection has now been moved to the "gear" popup menu. If no asset is created, we now automatically create one.
- In the inspector for Input Settings assets, we now show a button to go to the Input Settings window, and a button to make the asset active if it isn't.
- Tests are now no longer part of the com.unity.inputsystem package. The
InputTestFixture
class still is for when you want to write input-related tests for your project. You can reference theUnity.InputSystem.TestFixture
assembly when you need to do that. - Implemented adding usages to and removing them from devices.
Actions
- A number of changes have been made to the control picker UI in the editor.
Input Control Picker- The button to pick controls interactively (e.g. by pressing a button on a gamepad) has been moved inside the picker and renamed to "Listen". It now works as a toggle that puts the picker into a special kind of 'search' mode. While listening, suitable controls that are actuated will be listed in the picker and can then be picked from.
- Controls are now displayed with their nice names (e.g. "Cross" instead of "buttonSouth" in the case of the PS4 controller).
- Child controls are indented instead of listed in "parent/child" format.
- The hierarchy of devices has been rearranged for clarity. The toplevel groups of "Specific Devices" and "Abstract Devices" are now merged into one hierarchy that progressively groups devices into more specific groups.
- Controls now have icons displayed for them.
- There is new support for binding to keys on the keyboard by their generated character rather than by their location.
Keyboard Binding- At the toplevel of the Keyboard device, you now have the choice of either binding by keyboard location or binding by generated/mapped character.
- Binding by location shows differences between the local keyboard layout and the US reference layout.
- The control path language has been extended to allow referencing controls by display name.
<Keyboard>/#(a)
binds to the control on aKeyboard
with the display namea
.
continuous
flag is now ignored forPress and Release
interactions, as it did not make sense.- Reacting to controls that are already actuated when an action is enabled is now an optional behavior rather than the default behavior. This is a breaking change.
- Essentially, this change reverts back to the behavior before 0.2-preview.
- To reenable the behavior, toggle "Initial State Check" on in the UI or set the
initialStateCheck
property in code. Inital State Check - The reason for the change is that having the behavior on by default made certain setups hard to achieve. For example, if
<Keyboard>/escape
is used in one action map to toggle into the main menu and in another action map to toggle out of it, then the previous behavior would immediately exit out of the menu ifescape
was still pressed from going into the menu.
We have come to believe that wanting to react to the current state of a control right away is the less often desirable behavior and so have made it optional with a separate toggle.
- Processors and Interactions are now shown in a component-inspector-like fashion in the Input Action editor window, allowing you to see the properties of all items at once.
- The various
InputAction.lastTriggerXXX
APIs have been removed.- Rationale: They have very limited usefulness and if you need the information, it's easy to set things up in order to keep track of it yourself. Also, we plan on having a polling API for actions in the future which is really what the
lastActionXXX
APIs were trying to (imperfectly) solve.
- Rationale: They have very limited usefulness and if you need the information, it's easy to set things up in order to keep track of it yourself. Also, we plan on having a polling API for actions in the future which is really what the
Tap
,SlowTap
, andMultiTap
interactions now respect button press points.Tap
,SlowTap
, andMultiTap
interactions now have improved parameter editing UIs.
Fixed
- Input Settings configured in the editor are now transferred to the built player correctly.
- Time slicing for fixed updates now works correctly, even when pausing or dropping frames.
- Make sure we Disable any InputActionAsset when it is being destroyed. Otherwise, callbacks which were not cleaned up would could cause exceptions.
- DualShock sensors on PS4 are now marked as noisy (#494).
- IL2CPP causing issues with XInput on windows and osx desktops.
- Devices not being available yet in
MonoBehavior.Awake
,MonoBehaviour.Start
, andMonoBehaviour.OnEnable
in player or when entering play mode in editor. - Fixed a bug where the event buffer used by
InputEventTrace
could get corrupted.
Actions
- Actions and bindings disappearing when control schemes have spaces in their names.
InputActionRebindingExceptions.RebindOperation
can now be reused as intended; used to stop working properly the first time a rebind completed or was cancelled.- Actions bound to multiple controls now trigger correctly when using
PressInteraction
set toReleaseOnly
(#492). PlayerInput
no longer fails to find actions when using UnityEvents (#500).- The
"{...}"
format for referencing action maps and actions using GUIDs as strings has been obsoleted. It will still work but adding the extra braces is no longer necessary. - Drag&dropping bindings between other bindings that came before them in the list no longer drops the items at a location one higher up in the list than intended.
- Editing name of control scheme in editor not taking effect except if hitting enter key.
- Saving no longer causes the selection of the current processor or interaction to be lost.
- This was especially annoying when having "Auto-Save" on as it made editing parameters on interactions and processors very tedious.
- In locales that use decimal separators other than '.', floating-point parameters on composites, interactions, and processors no longer lead to invalid serialized data being generated.
- Fix choosing "Add Action" in action map context menu throwing an exception.
- The input action asset editor window will no longer fail saving if the asset has been moved.
- The input action asset editor window will now show the name of the asset being edited when asking for saving changes.
- Clicking "Cancel" in the save changes dialog for the input action asset editor window will now cancel quitting the editor.
- Fixed pasting or dragging a composite binding from one action into another.
- In the action map editor window, switching from renaming an action to renaming an action map will no longer break the UI.
- Fixed calling Enable/Disable from within action callbacks sometimes leading to corruption of state which would then lead to actions not getting triggered (#472).
- Fixed setting of "Auto-Save" toggle in action editor getting lost on domain reload.
- Fixed blurry icons in editor for imported .inputactions assets and actions in them.
Press
andRelease
interactions will now work correctly if they have multiple bound controls.Release
interactions will now invoke aStarted
callback when the control is pressed.- Made Vector2 composite actions respect the press points of button controls used to compose the value.