Skip to content

Commit 7bb4166

Browse files
author
Unity Technologies
committed
## [1.16.0] - 2025-11-10 ### Changed - Replaced "Look" rebinding button for "Keyboard" control scheme with a mouse sensitivity slider in `RebindingUISample` to illustrate how to support customizing scaling of mouse deltas and how to reapply the persisted setting between runs. - Changed: Input System no longer depends the obsolete com.unity.modules.vr package. - Removed code that had to do with Unity versions older than Unity 2021.3 LTS. ### Added - Added an example of how to swap two similar controls to the `RebindingUISample`. This is accessible via a button with two arrows at the right hand-side of the screen. Pressing the button allows swapping the current bindings of the "Move" and "Look" gamepad bindings via the new `RebindActionUI.SwapBinding(RebindActionUI other)` method. - Added support for (MonoBehavior OnMouse events) [https://docs.unity3d.com/ScriptReference/MonoBehaviour.html] when running the Input System on Unity 6000.4 or newer. - Added tests and a sample for MonoBehavior OnMouse events using the InputSystem package. - Added support for all the existing InputControl types in InputTestFixture.Trigger [ISXB-1716] ### Fixed - Fixed warnings being generated on Unity 6.3 (beta). (ISXB-1718). - Fixed an issue in `DeltaStateEvent.From` where unsafe code would throw exception or crash if internal pointer `currentStatePtr` was `null`. [ISXB-1637](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1637). - Fixed an issue in `InputTestFixture.Set` where attempting to change state of a device not belonging to the test fixture context would result in null pointer exception or crash. [ISXB-1637](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1637). - Fixed an issue where input action parameter overrides applied via `InputActionRebindingExtensions.ApplyParameterOverride` would not be applied if the associated binding has the empty string as `InputBinding.name`and the binding mask also has the empty string as name. (ISXB-1721). - Fixed an issue in `InputActionReference` where `Set` was not updating the cached action leading to incorrect evaluation of `InputActionReference.action` after first being cached, then set, then read again. This could lead to reference not being reset if set programmatically during play-mode. [ISXB-1584](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1584). - Fixed an issue where `InputActionSetupExtensions.Remove` will result in `NullReferenceException` if the action being removed has no bindings. (ISXB-1688). - Fixed an issue where assigning a ``MonoBehaviour` field of type `InputActionReference` to an instance stored in `.inputactions` asset via `InputActionReference.Set` in playmode corrupts the originally referenced asset. (ISXB-1692). - Fixed an issue where `InputActionReference.Create(null)` returns `null` instead "of a reference object to the given action" as documented behaviour for the API. (ISXB-1693) - Fixed an issue where `InputActionReference.Set(null)` does not update the cached input action reference nor the `ScriptableObject.name` leading to incorrect action being returned and reference showing up as the path to the previously assigned action in Inspector. (ISXB-1694) - Fixed an issue where Inspector field of type `InputActionReference` isn't reflecting broken reference in case action is deleted from asset, action map is deleted from asset, or the asset itself is deleted. (ISXB-1701) - Fixed HID parsing not handling logical minimum and maximum values correctly when they are negative. This applies for platforms that parse HID descriptors in the package, e.g. macOS at the moment. - Fix usage of correct data format for stick axes in HID Layout Builder ([User contribution](Unity-Technologies/InputSystem#2245)) - Fixed InputSystemUIInputModule calling pointer events on parent objects even when the "Send Pointer Hover To Parent" is off on 2022.3.XX. This was was previously only available on Unity 6 versions since 1.11.0. [ISXB-1296] - Limited the Add Control Scheme popup window max size to be its parent window, so that it won't resize beyond the visible area. [ISXB-1733](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1733) - Fixed an issue where the action icon would shrink or disappear from UI when an action has a very long name. [ISXB-1650](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1650). - Fixed upgrading input actions containing multiple processors [ISXB-1674](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1674). - Fixed an issue that led to non-deterministic behaviour during `.inputaction` asset imports that could lead to corrupted assets or Unity hanging during asset import when "Generate C# Scripts" was active in importer settings. [ISXB-1746](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1746)
1 parent ff8b8fd commit 7bb4166

76 files changed

Lines changed: 2197 additions & 1120 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.attestation.p7m

-1 Bytes
Binary file not shown.

.signature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"timestamp":1759486269,"signature":"Dl+V2njTqvXBo5W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FkVmdEbFhpb2VpUnV6OERKWFgvblpmU1JWKytwbk9ySTRibG4KS0twelJlNW14OTc1SjhxZ1FvRktKT0NNRlpHdkJMR2MxSzZZaEIzOHJFODZCZzgzbUovWjBEYkVmQjBxZm13cgo2ZDVFUXFsd0E5Y3JZT1YyV1VpWXprSnBLNmJZNzRZNmM1TmpBcEFKeGNiaTFOaDlRVEhUcU44N0ZtMDF0R1ZwCjVNd1pXSWZuYVRUemEvTGZLelR5U0pka0tldEZMVGdkYXpMYlpzUEE2aHBSK0FJRTJhc0tLTi84UUk1N3UzU2cKL2xyMnZKS1IvU2l5eEN1Q20vQWJkYnJMbXk0WjlSdm1jMGdpclA4T0lLQWxBRWZ2TzV5Z2hSKy8vd1RpTFlzUQp1SllDM0V2UE16ZGdKUzdGR2FscnFLZzlPTCsxVzROY05yNWdveVdSUUJ0cktKaWlTZEJVWmVxb0RvSUY5NHpCCndGbzJJT1JFdXFqcU51M3diMWZIM3p1dGdtalFra3IxVjJhd3hmcExLWlROQWdNQkFBRT0KLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg"}

CHANGELOG.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,38 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
88
Due to package verification, the latest version below is the unpublished version and the date is meaningless.
99
however, it has to be formatted properly to pass verification tests.
1010

11+
## [1.16.0] - 2025-11-10
12+
13+
### Changed
14+
- Replaced "Look" rebinding button for "Keyboard" control scheme with a mouse sensitivity slider in `RebindingUISample` to illustrate how to support customizing scaling of mouse deltas and how to reapply the persisted setting between runs.
15+
- Changed: Input System no longer depends the obsolete com.unity.modules.vr package.
16+
- Removed code that had to do with Unity versions older than Unity 2021.3 LTS.
17+
18+
### Added
19+
- Added an example of how to swap two similar controls to the `RebindingUISample`. This is accessible via a button with two arrows at the right hand-side of the screen. Pressing the button allows swapping the current bindings of the "Move" and "Look" gamepad bindings via the new `RebindActionUI.SwapBinding(RebindActionUI other)` method.
20+
- Added support for (MonoBehavior OnMouse events) [https://docs.unity3d.com/ScriptReference/MonoBehaviour.html] when running the Input System on Unity 6000.4 or newer.
21+
- Added tests and a sample for MonoBehavior OnMouse events using the InputSystem package.
22+
- Added support for all the existing InputControl types in InputTestFixture.Trigger [ISXB-1716]
23+
24+
### Fixed
25+
- Fixed warnings being generated on Unity 6.3 (beta). (ISXB-1718).
26+
- Fixed an issue in `DeltaStateEvent.From` where unsafe code would throw exception or crash if internal pointer `currentStatePtr` was `null`. [ISXB-1637](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1637).
27+
- Fixed an issue in `InputTestFixture.Set` where attempting to change state of a device not belonging to the test fixture context would result in null pointer exception or crash. [ISXB-1637](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1637).
28+
- Fixed an issue where input action parameter overrides applied via `InputActionRebindingExtensions.ApplyParameterOverride` would not be applied if the associated binding has the empty string as `InputBinding.name`and the binding mask also has the empty string as name. (ISXB-1721).
29+
- Fixed an issue in `InputActionReference` where `Set` was not updating the cached action leading to incorrect evaluation of `InputActionReference.action` after first being cached, then set, then read again. This could lead to reference not being reset if set programmatically during play-mode. [ISXB-1584](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1584).
30+
- Fixed an issue where `InputActionSetupExtensions.Remove` will result in `NullReferenceException` if the action being removed has no bindings. (ISXB-1688).
31+
- Fixed an issue where assigning a ``MonoBehaviour` field of type `InputActionReference` to an instance stored in `.inputactions` asset via `InputActionReference.Set` in playmode corrupts the originally referenced asset. (ISXB-1692).
32+
- Fixed an issue where `InputActionReference.Create(null)` returns `null` instead "of a reference object to the given action" as documented behaviour for the API. (ISXB-1693)
33+
- Fixed an issue where `InputActionReference.Set(null)` does not update the cached input action reference nor the `ScriptableObject.name` leading to incorrect action being returned and reference showing up as the path to the previously assigned action in Inspector. (ISXB-1694)
34+
- Fixed an issue where Inspector field of type `InputActionReference` isn't reflecting broken reference in case action is deleted from asset, action map is deleted from asset, or the asset itself is deleted. (ISXB-1701)
35+
- Fixed HID parsing not handling logical minimum and maximum values correctly when they are negative. This applies for platforms that parse HID descriptors in the package, e.g. macOS at the moment.
36+
- Fix usage of correct data format for stick axes in HID Layout Builder ([User contribution](https://github.com/Unity-Technologies/InputSystem/pull/2245))
37+
- Fixed InputSystemUIInputModule calling pointer events on parent objects even when the "Send Pointer Hover To Parent" is off on 2022.3.XX. This was was previously only available on Unity 6 versions since 1.11.0. [ISXB-1296]
38+
- Limited the Add Control Scheme popup window max size to be its parent window, so that it won't resize beyond the visible area. [ISXB-1733](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1733)
39+
- Fixed an issue where the action icon would shrink or disappear from UI when an action has a very long name. [ISXB-1650](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1650).
40+
- Fixed upgrading input actions containing multiple processors [ISXB-1674](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1674).
41+
- Fixed an issue that led to non-deterministic behaviour during `.inputaction` asset imports that could lead to corrupted assets or Unity hanging during asset import when "Generate C# Scripts" was active in importer settings. [ISXB-1746](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1746)
42+
1143
## [1.15.0] - 2025-10-03
1244

1345
### Changed
@@ -26,8 +58,9 @@ however, it has to be formatted properly to pass verification tests.
2658
- Fixed the compilation warnings when used with Unity 6.4 (ISX-2349).
2759
- Fixed an issue where `InputSystemUIInputModule.localMultiPlayerRoot` could not be set to `null` when using `MultiplayerEventSystem`. [ISXB-1610](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1610)
2860
- Fixed an issue in `Keyboard` where the sub-script operator would return a `null` key control for the deprecated key `Key.IMESelected`. Now, an aliased `KeyControl`mapping to the IMESelected bit is returned for compability reasons. It is still strongly advised to not rely on this key since `IMESelected` bit isn't strictly a key and will be removed from the `Key` enumeration type in a future major revision. [ISXB-1541](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1541).
61+
- Fixed an issue where the onAnyButtonPress callback would be triggered multiple times during unrelated events when a button is held down. See [ISXB-1005](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1005).
2962
- Fixed InputControl picker not updating correctly when the Input Actions Window was dirty. [ISXB-1221](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1221)
30-
- Fixed formatting issues on processor documentation page
63+
- Fixed formatting issues on processor documentation page.
3164

3265
## [1.14.2] - 2025-08-05
3366

Documentation~/filter.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,11 @@ apiRules:
8787
type: Type
8888
- exclude:
8989
uidRegex: ^UnityEngine\.InputSystem\.XR\.EyesControl$
90-
type: Type
90+
type: Type
91+
- exclude:
92+
uidRegex: ^UnityEngine\.InputSystem\.Users\.InputUser\.platformUserAccount.*$
93+
type: Member
94+
- exclude:
95+
uidRegex: ^UnityEngine\.InputSystem\.Users\.InputUser\.FindUserByAccount.*$
96+
type: Method
97+

InputSystem/Actions/InputActionAsset.cs

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,11 @@ internal void MigrateJson(ref ReadFileJson parsedJson)
10161016
return;
10171017
if ((parsedJson.maps?.Length ?? 0) > 0 && (parsedJson.version) < JsonVersion.Version1)
10181018
{
1019+
List<NameAndParameters> parsedList = null;
1020+
var converted = new List<NameAndParameters>(8);
1021+
var updatedParameters = new List<NamedValue>(4);
1022+
var enumValuesCache = new Dictionary<Type, Array>(8);
1023+
10191024
for (var mi = 0; mi < parsedJson.maps.Length; ++mi)
10201025
{
10211026
var mapJson = parsedJson.maps[mi];
@@ -1026,44 +1031,49 @@ internal void MigrateJson(ref ReadFileJson parsedJson)
10261031
if (string.IsNullOrEmpty(raw))
10271032
continue;
10281033

1029-
var list = NameAndParameters.ParseMultiple(raw).ToList();
1030-
var rebuilt = new List<string>(list.Count);
1031-
foreach (var nap in list)
1034+
if (!NameAndParameters.ParseMultiple(raw, ref parsedList))
1035+
continue;
1036+
1037+
converted.Clear();
1038+
1039+
for (int i = 0; i < parsedList.Count; ++i)
10321040
{
1041+
var nap = parsedList[i];
10331042
var procType = InputSystem.TryGetProcessor(nap.name);
10341043
if (nap.parameters.Count == 0 || procType == null)
10351044
{
1036-
rebuilt.Add(nap.ToString());
1045+
converted.Add(nap);
10371046
continue;
10381047
}
1039-
1040-
var dict = nap.parameters.ToDictionary(p => p.name, p => p.value.ToString());
1041-
var anyChanged = false;
1042-
foreach (var field in procType.GetFields(BindingFlags.Public | BindingFlags.Instance).Where(f => f.FieldType.IsEnum))
1048+
updatedParameters.Clear();
1049+
for (int k = 0; k < nap.parameters.Count; ++k)
10431050
{
1044-
if (dict.TryGetValue(field.Name, out var ordS) && int.TryParse(ordS, out var ord))
1051+
var param = nap.parameters[k];
1052+
var updatedPar = param;
1053+
1054+
var fieldInfo = procType.GetField(param.name, BindingFlags.Public | BindingFlags.Instance);
1055+
if (fieldInfo != null && fieldInfo.FieldType.IsEnum)
10451056
{
1046-
var values = Enum.GetValues(field.FieldType).Cast<object>().ToArray();
1047-
if (ord >= 0 && ord < values.Length)
1057+
var index = param.value.ToInt32();
1058+
if (index >= 0)
10481059
{
1049-
dict[field.Name] = Convert.ToInt32(values[ord]).ToString();
1050-
anyChanged = true;
1060+
if (!enumValuesCache.TryGetValue(fieldInfo.FieldType, out var values))
1061+
{
1062+
values = Enum.GetValues(fieldInfo.FieldType);
1063+
enumValuesCache[fieldInfo.FieldType] = values;
1064+
}
1065+
if (index < values.Length)
1066+
{
1067+
var convertedValue = Convert.ToInt32(values.GetValue(index));
1068+
updatedPar = NamedValue.From(param.name, convertedValue);
1069+
}
10511070
}
10521071
}
1072+
updatedParameters.Add(updatedPar);
10531073
}
1054-
1055-
if (!anyChanged)
1056-
{
1057-
rebuilt.Add(nap.ToString());
1058-
}
1059-
else
1060-
{
1061-
var paramText = string.Join(",", dict.Select(kv => $"{kv.Key}={kv.Value}"));
1062-
rebuilt.Add($"{nap.name}({paramText})");
1063-
}
1074+
converted.Add(NameAndParameters.Create(nap.name, updatedParameters));
10641075
}
1065-
1066-
actionJson.processors = string.Join(";", rebuilt);
1076+
actionJson.processors = NameAndParameters.ToSerializableString(converted);
10671077
mapJson.actions[ai] = actionJson;
10681078
}
10691079
parsedJson.maps[mi] = mapJson;

InputSystem/Actions/InputActionRebindingExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,8 +1326,8 @@ private static void LoadBindingOverridesFromJsonInternal(this IInputActionCollec
13261326
///
13271327
/// public void OnClick()
13281328
/// {
1329-
/// var rebind = actionReference.action.PerformInteractiveRebinding().WithTargetBinding(bindingIndex).OnComplete(_ => UpdateDisplayText());
1330-
/// rebind.Start();
1329+
/// var l_rebind = actionReference.action.PerformInteractiveRebinding().WithTargetBinding(bindingIndex).OnComplete(_ => UpdateDisplayText());
1330+
/// l_rebind.Start();
13311331
/// }
13321332
///
13331333
/// private void UpdateDisplayText()

0 commit comments

Comments
 (0)