Skip to content

Conversation

@ekcoh
Copy link
Collaborator

@ekcoh ekcoh commented Apr 3, 2025

Description

Suggested fix for https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1306. Essentially we had a bug preventing actions with names containing a "/" to be found by name since logic couldn't handle both map syntax and this case.

Testing status & QA

Added unit tests that cover the specified behavior (see diff).

Overall Product Risks

  • Complexity: Small
  • Halo Effect: Small

Comments to reviewers

Repro case on ticket should be sufficient as a check for manual testing (Also covered by automated existing and new tests) so I believe chance of regression is minimal. Good to look for potential mistakes with names vs path-syntax I might have overlooked.

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.

After merge:

  • Create forward/backward port if needed. If you are blocked from creating a forward port now please add a task to ISX-1444.

@ekcoh ekcoh requested review from K-Tone, Pauliusd01 and ritamerkl April 3, 2025 12:21
Copy link
Collaborator

@Pauliusd01 Pauliusd01 left a comment

Choose a reason for hiding this comment

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

LGTM, tried finding actions with 1/multiple slashes, special symbols, non latin characters

@ekcoh ekcoh changed the title FIX: Fixed a bug within InputActionAsset.cs that prevented actions containing slashes to be found by name. FIX: ISXB-1306 Fixed a bug within InputActionAsset.cs that prevented actions containing slashes to be found by name. Apr 4, 2025
}, Is.Not.AllocatingGCMemory());
}

// https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1306
Copy link
Collaborator

Choose a reason for hiding this comment

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

Alternatively, links could be put into a Description attribute:

[Description("See https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1306")]

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a fair change to this test since specific to reported use-case

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in b78188b

@ekcoh ekcoh requested review from jfreire-unity and removed request for ritamerkl April 4, 2025 10:11
@ekcoh ekcoh requested a review from K-Tone April 4, 2025 12:45
Copy link
Collaborator

@K-Tone K-Tone left a comment

Choose a reason for hiding this comment

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

lgtm, thanks for working on the suggestions -- and have a great weekend

@ekcoh ekcoh merged commit 35f8b70 into develop Apr 4, 2025
110 checks passed
@ekcoh ekcoh deleted the isxb-1306-findaction-bug branch April 4, 2025 15:01
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.

5 participants