InputSystem
InputSystem copied to clipboard
FIX: DefaultActionMap dropdown set to <None> by default (ISXB-1559)
Description
Like described in this ticket, the default ActionMap dropdown was set to <None> 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 <None>/or a specific action map should last after navigating away from the gameobject in the hierachy
- changing the actionmap to <None>/or a specific action map should last after switching to PlayMode/EditMode
Checklist
Before review:
- [x] Changelog entry added.
- Explains the change in
Changed,Fixed,Addedsections. - For API change contains an example snippet and/or migration example.
- JIRA ticket linked, example (case %<ID>%). If it is a private issue, just add the case ID without a link.
- Jira port for the next release set as "Resolved".
- Explains the change in
- [ ] Tests added/changed, if applicable.
- Functional tests
Area_CanDoX,Area_CanDoX_EvenIfYIsTheCase,Area_WhenIDoX_AndYHappens_ThisIsTheResult. - Performance tests.
- Integration tests.
- Functional 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:
- [x] 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 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 :warning: |
@@ Coverage Diff @@
## develop #2194 +/- ##
===========================================
- Coverage 67.80% 67.79% -0.01%
===========================================
Files 367 367
Lines 53526 53528 +2
===========================================
Hits 36291 36291
- Misses 17235 17237 +2
| Flag | Coverage Δ | |
|---|---|---|
| mac_2021.3_pkg | 5.41% <0.00%> (-0.01%) |
:arrow_down: |
| mac_2021.3_project | 70.43% <0.00%> (-0.01%) |
:arrow_down: |
| mac_2022.3_pkg | 5.19% <0.00%> (-0.01%) |
:arrow_down: |
| mac_2022.3_project | 65.29% <0.00%> (-0.01%) |
:arrow_down: |
| mac_6000.0_pkg | 5.20% <0.00%> (-0.01%) |
:arrow_down: |
| mac_6000.0_project | 67.71% <0.00%> (-0.02%) |
:arrow_down: |
| mac_6000.1_pkg | 5.20% <0.00%> (-0.01%) |
:arrow_down: |
| mac_6000.1_project | 67.71% <0.00%> (-0.01%) |
:arrow_down: |
| mac_6000.2_pkg | 5.20% <0.00%> (-0.01%) |
:arrow_down: |
| mac_6000.2_project | 67.70% <0.00%> (-0.01%) |
:arrow_down: |
| mac_trunk_pkg | 5.20% <0.00%> (-0.01%) |
:arrow_down: |
| mac_trunk_project | 67.71% <0.00%> (+<0.01%) |
:arrow_up: |
| win_2021.3_pkg | 5.42% <0.00%> (-0.01%) |
:arrow_down: |
| win_2021.3_project | 70.50% <0.00%> (-0.01%) |
:arrow_down: |
| win_2022.3_pkg | 5.19% <0.00%> (-0.01%) |
:arrow_down: |
| win_2022.3_project | 65.36% <0.00%> (-0.01%) |
:arrow_down: |
| win_6000.0_pkg | 5.20% <0.00%> (-0.01%) |
:arrow_down: |
| win_6000.0_project | 67.78% <0.00%> (-0.01%) |
:arrow_down: |
| win_6000.1_pkg | 5.20% <0.00%> (-0.01%) |
:arrow_down: |
| win_6000.1_project | 67.78% <0.00%> (-0.01%) |
:arrow_down: |
| win_6000.2_pkg | 5.20% <0.00%> (-0.01%) |
:arrow_down: |
| win_6000.2_project | 67.77% <0.00%> (-0.02%) |
:arrow_down: |
| win_trunk_pkg | 5.20% <0.00%> (-0.01%) |
:arrow_down: |
| win_trunk_project | 67.78% <0.00%> (-0.01%) |
:arrow_down: |
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.25% <0.00%> (-0.05%) |
:arrow_down: |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Can new automated tests be added for this?
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
I think that should be changed anyway since using the PWA asset for PlayerInput is not recommended - do we have a ticket to remove the automated prefill with the PWA asset?