Skip to content

Conversation

ekcoh
Copy link
Collaborator

@ekcoh ekcoh commented Sep 22, 2025

Description

This PR improves the "rebinding sample" in the following ways:

  • Adds a "swap bindings" button to showcase how to swap two similar bindings. This is currently applied to the move and look actions of the gamepad control scheme.
  • Improved RebindSaveLoad by documenting it and extracting Load/Save to API surface of the class and only calling them from OnEnable/OnDisable. Also made the actual PlayerPrefs key a string property of the component. This allows this file to be a reusable component as-is is nice there is nothing hard-coded and it may be used on OnEnable/OnDisable or just programatically.
  • Removed delta action binding from "Look" action since it is intentionally ignored by rebinding framework. This control is now instead replaced by a UI slider allowing to control/override mouse sensitivity of the associated action and persist the setting across runs.
  • Refactored rebinding sample custom editor code to reduce code bloat and enable code reuse via composition.
  • Extended "Reset All" button to also reset look sensitivity for "Keyboard & Mouse" scheme.
  • Added RebindActionParameterUI which is a slider UI integration example of configuring action processor parameters directly by adding the monobehavior, configuring it and run. Supports overriding action or binding processors.
  • Added RebindActionParameterUIEditor which is a custom editor for the above MonoBehaviour.

It also fixes bug ISXB-1721 which was required to make mouse sensitivity work properly. Looking through the logic close to the the fix/diff in InputActionParameters.cs suggests there are more empty-string bugs for the other match conditions that might need to be looked into and be properly tested since all but ID check seems to suffer from similar problems.

Testing status & QA

Functionality has been tested during development by running the associated sample.

Automated test have been added to prove failure of ISXB-1721 and its fix and prevent future regressions.

Overall Product Risks

Small, no changes to source, only to sample scripts.

  • Complexity: Medium
  • Halo Effect: Small

Comments to reviewers

I am not 100% sure the scene save doesn't contain any accidental changes but I believe it should be fine.

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 changed the title Rebinding sample improvements Rebinding sample improvements + on-screen controls Sep 26, 2025
@ekcoh ekcoh changed the title Rebinding sample improvements + on-screen controls ISX-2377: Rebinding sample improvements + on-screen controls (Validation week) Oct 6, 2025
@ekcoh ekcoh changed the title ISX-2377: Rebinding sample improvements + on-screen controls (Validation week) ISX-2377: Rebinding sample improvements (Mouse sensitivity + Swap sticks) (Validation week) Oct 6, 2025
@ekcoh ekcoh marked this pull request as ready for review October 6, 2025 14:24
@ekcoh ekcoh requested review from Pauliusd01 and ritamerkl October 6, 2025 14:25
@ekcoh
Copy link
Collaborator Author

ekcoh commented Oct 10, 2025

I can confirm sensitivity slider is broken, will fix and rerequest review when done.

@ekcoh ekcoh changed the title CHANGE: ISX-2377: Rebinding sample improvements (Mouse sensitivity + Swap sticks) (Validation week) CHANGE: ISX-2377: Rebinding sample improvements (Mouse sensitivity + Swap sticks) (Validation week), FIX: ISXB-1721 ApplyParameterOverride doesn't work if binding name is empty string. Oct 12, 2025
@ekcoh
Copy link
Collaborator Author

ekcoh commented Oct 12, 2025

@Pauliusd01 Had to extend this PR with a bug fix for ISXB-1721 (and test case to prove it failed before and passes after fix) which was needed to support mouse sensitivity properly so should be good now.

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.

Two issues I see, one is that the UI map is active during gameplay:
image

And the other is that I can't navigate the rebinding menus via gamepad anymore when I previously could. At first I thought it was the slider's fault but I can't jump to the right side of the menus even without having selected it so something else is going on there.

@ekcoh
Copy link
Collaborator Author

ekcoh commented Oct 13, 2025

Two issues I see, one is that the UI map is active during gameplay: image

And the other is that I can't navigate the rebinding menus via gamepad anymore when I previously could. At first I thought it was the slider's fault but I can't jump to the right side of the menus even without having selected it so something else is going on there.

Thanks, I guess I messed up something in the UI navigation configuration, will check. The UI map being enabled is a mistake from me since it had to be enabled to support on screen controls. Since I removed them from this branch (was only temporarily there), I guess I forgot to undo that change.

…ls later), disabled setting that UI actions should be enabled in game mode.
@ekcoh
Copy link
Collaborator Author

ekcoh commented Oct 13, 2025

one is that the UI map is active during gameplay:
This has been addressed in 35a4927, also removed script RequireTouichscreen and the on-screen menu button which was associated with on screen controls and shouldn't be included in this PR.

@ekcoh
Copy link
Collaborator Author

ekcoh commented Oct 13, 2025

Will look into UI navigation now.

@ekcoh
Copy link
Collaborator Author

ekcoh commented Oct 13, 2025

Will look into UI navigation now.

Seems UGUIs automatic navigation mode will not be sufficient to get it right given current UI which seems to be indicated when visualising the automatic navigation links. I will set it up explicitly to work around it unless I find some culprit soon.

Culprit seems to be the slider, as long as it is included the buttons no longer get decent navigation links, so I guess we need to set it up.

@ekcoh
Copy link
Collaborator Author

ekcoh commented Oct 13, 2025

And the other is that I can't navigate the rebinding menus via gamepad anymore when I previously could. At first I thought it was the slider's fault but I can't jump to the right side of the menus even without having selected it so something else is going on there.

I have now added explicit navigation links to make sure UI navigates correctly when Automatic is not sufficient. Ready to re-evaluate @Pauliusd01

@ekcoh ekcoh requested a review from Pauliusd01 October 13, 2025 07:41
Copy link
Collaborator

@ritamerkl ritamerkl left a comment

Choose a reason for hiding this comment

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

Mainly nitpicks, the code looks good to me.
There are two comments, which needs to be addressed and one outstanding file rename.

@ekcoh ekcoh merged commit 060b562 into develop Oct 14, 2025
113 of 115 checks passed
@ekcoh ekcoh deleted the rebinding-sample-extension branch October 14, 2025 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants