Unity-Technologies / InputSystem

An efficient and versatile input system for Unity.
Other
1.42k stars 306 forks source link

FIX: Submit and Cancel actions should obey configured interactions. #1956

Closed smnwttbr closed 2 months ago

smnwttbr commented 2 months ago

Description

Submit and Cancel actions were always triggered on a press event, even if the interaction was configured as ReleaseOnly. This PR changes that so that Interactions are respected. ISXB-841

Changes made

InputSystemUIInputModule was changed to use WasPerformedThisFrame() instead of WasPressedThisFrame().

Testing

Tested manually using project supplied in Jira.

Risk

These changes are fundamental to how the submit and cancel actions are triggered. Any projects relying on the old behaviour will be disrupted.

Checklist

Before review:

During merge:

After merge:

ekcoh commented 2 months ago

Added @stefanunity for QA assessment.

bmalrat commented 2 months ago

Changes look good to me, suggest just getting a sanity check from @benoitalain or @bmalrat on this one in case of side effects. Would be awesome if it could be covered by an automated test as well (if not already covered by a test in UITests.cs).

Seems good for me, I don't see any side effects for that one

ekcoh commented 2 months ago

@smnwttbr I only believe conflicts need to be resolved and then I think you may merge this.

ekcoh commented 2 months ago

I fixed the conflict in CHANGELOG.md and also moved the message from CHANGE to FIX since this was a bug report and behavior didn't do what it was supposed to. Let me know if you think it was an incorrect call.