Skip to content

Clarify InputBinding.Matches mask semantics#2426

Open
AswinRajGopal wants to merge 3 commits into
developfrom
input/improvedocs/inputactionbinding-matches
Open

Clarify InputBinding.Matches mask semantics#2426
AswinRajGopal wants to merge 3 commits into
developfrom
input/improvedocs/inputactionbinding-matches

Conversation

@AswinRajGopal
Copy link
Copy Markdown
Collaborator

Description

Clarifies the XML documentation for InputBinding.Matches to state that it performs mask/filter matching, not equality comparison.
The updated docs call out that a binding may not match itself when one of its mask fields, such as groups, contains a value that does not match as a filter. The docs now alsopoint users to Equals(InputBinding) / == for binding equivalence checks.

Testing status & QA

Documentation-only change. No tests run.

Overall Product Risks

Please rate the potential complexity and halo effect from low to high for the reviewers. Note down potential risks to specific Editor branches if any.

  • Complexity:
  • Halo Effect:

Comments to reviewers

Please describe any additional information such as what to focus on, or historical info for the reviewers.

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

Copy link
Copy Markdown
Contributor

@u-pr u-pr Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect

The changes are clean and well-structured, with only a minor XML documentation warning worth addressing to ensure proper reference resolution.

Additional observations

  • Packages/com.unity.inputsystem/InputSystem/Runtime/Actions/InputBinding.cs:786 (low) — In C# XML documentation, referencing overloaded operators typically requires a space between the operator keyword and the operator symbol itself. Consider changing <see cref="operator=="/> to <see cref="operator =="/> (or fully specifying it as <see cref="operator ==(InputBinding, InputBinding)"/>) to ensure documentation generators (such as DocFX) resolve the reference correctly and to avoid potential CS1574 compiler warnings.

🤖 Helpful? 👍/👎

@codecov-github-com
Copy link
Copy Markdown

codecov-github-com Bot commented Jun 3, 2026

Codecov Report

All modified and coverable lines are covered by tests ✅

@@             Coverage Diff             @@
##           develop    #2426      +/-   ##
===========================================
+ Coverage    78.13%   78.89%   +0.76%     
===========================================
  Files          483      762     +279     
  Lines        98770   139274   +40504     
===========================================
+ Hits         77169   109882   +32713     
- Misses       21601    29392    +7791     
Flag Coverage Δ
inputsystem_MacOS_6000.0 5.32% <ø> (+0.01%) ⬆️
inputsystem_MacOS_6000.0_project 77.28% <ø> (-0.02%) ⬇️
inputsystem_MacOS_6000.3 5.32% <ø> (+0.01%) ⬆️
inputsystem_MacOS_6000.3_project 77.28% <ø> (+<0.01%) ⬆️
inputsystem_MacOS_6000.4 5.33% <ø> (+0.01%) ⬆️
inputsystem_MacOS_6000.4_project 77.29% <ø> (+<0.01%) ⬆️
inputsystem_MacOS_6000.5 5.32% <ø> (+0.01%) ⬆️
inputsystem_MacOS_6000.5_project 77.32% <ø> (+<0.01%) ⬆️
inputsystem_MacOS_6000.6_project 77.32% <ø> (+0.01%) ⬆️
inputsystem_Ubuntu_6000.0 5.33% <ø> (+0.01%) ⬆️
inputsystem_Ubuntu_6000.0_project 77.19% <ø> (-0.02%) ⬇️
inputsystem_Ubuntu_6000.3 5.33% <ø> (+0.01%) ⬆️
inputsystem_Ubuntu_6000.3_project 77.18% <ø> (+<0.01%) ⬆️
inputsystem_Ubuntu_6000.4 5.33% <ø> (+0.01%) ⬆️
inputsystem_Ubuntu_6000.4_project 77.20% <ø> (+<0.01%) ⬆️
inputsystem_Ubuntu_6000.5 5.32% <ø> (+0.01%) ⬆️
inputsystem_Ubuntu_6000.5_project 77.23% <ø> (+<0.01%) ⬆️
inputsystem_Ubuntu_6000.6_project 77.23% <ø> (+0.01%) ⬆️
inputsystem_Windows_6000.0 5.32% <ø> (+0.01%) ⬆️
inputsystem_Windows_6000.0_project 77.41% <ø> (-0.02%) ⬇️
inputsystem_Windows_6000.3 5.32% <ø> (+0.01%) ⬆️
inputsystem_Windows_6000.3_project 77.40% <ø> (+<0.01%) ⬆️
inputsystem_Windows_6000.4 5.33% <ø> (+0.01%) ⬆️
inputsystem_Windows_6000.4_project 77.41% <ø> (+<0.01%) ⬆️
inputsystem_Windows_6000.5 5.32% <ø> (+0.01%) ⬆️
inputsystem_Windows_6000.5_project 77.45% <ø> (+<0.01%) ⬆️
inputsystem_Windows_6000.6_project 77.46% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...system/InputSystem/Runtime/Actions/InputBinding.cs 77.41% <ø> (ø)

... and 210 files with indirect coverage changes

ℹ️ Need help interpreting these results?

Copy link
Copy Markdown
Collaborator

@suearkinunity suearkinunity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small suggestions - we use "don't" instead of "does not".

Comment thread Packages/com.unity.inputsystem/InputSystem/Runtime/Actions/InputBinding.cs Outdated
Comment thread Packages/com.unity.inputsystem/InputSystem/Runtime/Actions/InputBinding.cs Outdated
AswinRajGopal and others added 2 commits June 3, 2026 18:25
…utBinding.cs

Co-authored-by: Sue Arkin <85237015+suearkinunity@users.noreply.github.com>
…utBinding.cs

Co-authored-by: Sue Arkin <85237015+suearkinunity@users.noreply.github.com>
@AswinRajGopal AswinRajGopal requested a review from ritamerkl June 4, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants