Skip to content

Commit

Permalink
changed Submit and Cancel actions to use WasPerformed instead of
Browse files Browse the repository at this point in the history
WasPressed.
  • Loading branch information
smnwttbr committed Jun 25, 2024
1 parent 4db0e76 commit f6e8ad2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Packages/com.unity.inputsystem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ however, it has to be formatted properly to pass verification tests.

### Change
- Added warning messages to both `OnScreenStick` and `OnScreenButton` Inspector editors that would display a warning message in case on-screen control components are added to a `GameObject` not part of a valid UI hierarchy.
- Submit and Cancel UI actions will now respect configured interactions. [ISXB-841](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-841)

### Fixed
- Avoid potential crashes from `NullReferenceException` in `FireStateChangeNotifications`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -709,9 +709,9 @@ internal void ProcessNavigation(ref NavigationModel navigationState)
var cancelAction = m_CancelAction?.action;

var data = GetBaseEventData();
if (cancelAction != null && cancelAction.WasPressedThisFrame())
if (cancelAction != null && cancelAction.WasPerformedThisFrame())
ExecuteEvents.Execute(eventSystem.currentSelectedGameObject, data, ExecuteEvents.cancelHandler);
if (!data.used && submitAction != null && submitAction.WasPressedThisFrame())
if (!data.used && submitAction != null && submitAction.WasPerformedThisFrame())
ExecuteEvents.Execute(eventSystem.currentSelectedGameObject, data, ExecuteEvents.submitHandler);
}
}
Expand Down

0 comments on commit f6e8ad2

Please sign in to comment.