Skip to content

FIX: DefaultActionMap dropdown set to <None> by default (ISXB-1559) #2194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

ritamerkl
Copy link
Collaborator

@ritamerkl ritamerkl commented Jun 13, 2025

Description

Like described in this ticket, the default ActionMap dropdown was set to by default, this PR fixes this by setting the first ActionMap as a default option on changing/first adding the Action Asset.

Testing status & QA

Manual testing done.

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: low
  • Halo Effect: low

Comments to reviewers

Reviewers:
I renamed the OnActionAssetChange() method since this also happens as soon as the component window needs to be re-initialised after navigating away from the view, since the dependent properties are not static.
I edited the CheckIfActionAssetChanged() method, since it's not changing if the property just lost the reference when navigating away from the window.

For testing:

  • test changing action asset in the PlayerInput component and observe the pre-picked actionMap
  • test adding a PlayerInput component and add a action asset and observe the pre-picked actionMap
  • changing the actionMap to /or a specific action map should last after navigating away from the gameobject in the hierachy
  • changing the actionmap to /or a specific action map should last after switching to PlayMode/EditMode

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.

@codecov-github-com
Copy link

codecov-github-com bot commented Jun 13, 2025

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...putSystem/Plugins/PlayerInput/PlayerInputEditor.cs 0.00% 6 Missing ⚠️
@@           Coverage Diff            @@
##           develop    #2194   +/-   ##
========================================
  Coverage    67.80%   67.80%           
========================================
  Files          367      367           
  Lines        53513    53515    +2     
========================================
+ Hits         36282    36288    +6     
+ Misses       17231    17227    -4     
Flag Coverage Δ
mac_2021.3_pkg 5.41% <0.00%> (-0.01%) ⬇️
mac_2021.3_project 70.42% <0.00%> (-0.01%) ⬇️
mac_2022.3_pkg 5.19% <0.00%> (-0.01%) ⬇️
mac_2022.3_project 65.29% <0.00%> (-0.01%) ⬇️
mac_6000.0_pkg 5.20% <0.00%> (-0.01%) ⬇️
mac_6000.0_project 67.71% <0.00%> (-0.01%) ⬇️
mac_6000.1_pkg 5.20% <0.00%> (-0.01%) ⬇️
mac_6000.1_project 67.71% <0.00%> (-0.01%) ⬇️
mac_6000.2_pkg 5.20% <0.00%> (-0.01%) ⬇️
mac_6000.2_project 67.72% <0.00%> (+0.01%) ⬆️
mac_trunk_pkg 5.20% <0.00%> (-0.01%) ⬇️
mac_trunk_project 67.70% <0.00%> (-0.01%) ⬇️
win_2021.3_pkg 5.42% <0.00%> (-0.01%) ⬇️
win_2021.3_project 70.49% <0.00%> (-0.01%) ⬇️
win_2022.3_pkg 5.20% <0.00%> (-0.01%) ⬇️
win_2022.3_project 65.36% <0.00%> (-0.01%) ⬇️
win_6000.0_pkg 5.20% <0.00%> (-0.01%) ⬇️
win_6000.0_project 67.78% <0.00%> (+0.09%) ⬆️
win_6000.1_pkg 5.20% <0.00%> (-0.01%) ⬇️
win_6000.1_project 67.79% <0.00%> (+<0.01%) ⬆️
win_6000.2_pkg 5.20% <0.00%> (-0.01%) ⬇️
win_6000.2_project 67.78% <0.00%> (-0.01%) ⬇️
win_trunk_pkg 5.20% <0.00%> (-0.01%) ⬇️
win_trunk_project 67.77% <0.00%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
...putSystem/Plugins/PlayerInput/PlayerInputEditor.cs 8.41% <0.00%> (-0.05%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Pauliusd01
Copy link
Collaborator

Can new automated tests be added for this?

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, correct map is picked and kept between play modes when adding fresh assets to player input, switching them out, modifying the maps on an already present one, etc.

The only odd thing I noticed was that when a PWA asset exists and you create a player input component it pre-picks the PWA asset to it. Which is known and probably getting changed but the weird part is that it still pre-picks the None map. Not like it matters as that setting isn't respected with PWA assets at the moment but that was the only odd one out scenario

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.

2 participants