CHANGE: Add action map disable / enable to rebinding sample #2137
+448
−264
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When investigating ISXB-1396 and ultimately closing as by design; a possible improvement to our rebinding UI sample surfaced.
This PR changes the rebinding UI sample. When rebinding an action, the parent action map and the UI action map (in the project wide actions) are disabled. Considering the sample is intended to be used with older versions of Unity where project wide actions were not yet introduced, the input action asset has been manually added to the
RebindActionUI
script (and editor).Testing status & QA
Tested this locally with Unity 2021.3.45f1 and 6. Also tested with keyboard & mouse and a Dualshock 4 controller (when wired). But all we're doing is disabling the action map so this would have been tested widely by other tests.
Overall Product Risks
Comments to reviewers
Let me know if the team would like the reference to the UI action map to be obtained a different way, currently this is collected from the assigned default action map when the component is enabled via a call to
InputActionAsset.FindActionMap
.Checklist
Before review:
Changed
,Fixed
,Added
sections.Area_CanDoX
,Area_CanDoX_EvenIfYIsTheCase
,Area_WhenIDoX_AndYHappens_ThisIsTheResult
.During merge:
NEW: ___
.FIX: ___
.DOCS: ___
.CHANGE: ___
.RELEASE: 1.1.0-preview.3
.After merge: