Skip to content

Commit 34d2cca

Browse files
authored
FIX: Changed Submit and Cancel ui actions to use WasPerformed instead of WasPressed (#1956)
1 parent 6b48e6c commit 34d2cca

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ however, it has to be formatted properly to pass verification tests.
2929
- Fixed a performance issue with many objects using multiple action maps [ISXB-573](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-573).
3030
- Fixed an variable scope shadowing issue causing compilation to fail on Unity 2019 LTS.
3131
- Fixed an issue where changing `InputSettings` instance would not affect associated feature flags.
32+
- Submit and Cancel UI actions will now respect configured interactions. [ISXB-841](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-841).
3233
- Fixed the UI generation of enum fields when editing interactions of action properties. The new selected value was lost when saving.
3334
- Fixed the UI generation of custom interactions of action properties when it rely on OnGUI callback. [ISXB-886](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-886).
3435

36+
3537
### Added
3638
- Added additional device information when logging the error due to exceeding the maximum number of events processed
3739
set by `InputSystem.settings.maxEventsBytesPerUpdate`. This additional information is available in development builds

Packages/com.unity.inputsystem/InputSystem/Plugins/UI/InputSystemUIInputModule.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,9 +709,9 @@ internal void ProcessNavigation(ref NavigationModel navigationState)
709709
var cancelAction = m_CancelAction?.action;
710710

711711
var data = GetBaseEventData();
712-
if (cancelAction != null && cancelAction.WasPressedThisFrame())
712+
if (cancelAction != null && cancelAction.WasPerformedThisFrame())
713713
ExecuteEvents.Execute(eventSystem.currentSelectedGameObject, data, ExecuteEvents.cancelHandler);
714-
if (!data.used && submitAction != null && submitAction.WasPressedThisFrame())
714+
if (!data.used && submitAction != null && submitAction.WasPerformedThisFrame())
715715
ExecuteEvents.Execute(eventSystem.currentSelectedGameObject, data, ExecuteEvents.submitHandler);
716716
}
717717
}

0 commit comments

Comments
 (0)