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.

Testing status & QA

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

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 ritamerkl and Pauliusd01 October 6, 2025 14:25
@ekcoh ekcoh changed the title ISX-2377: Rebinding sample improvements (Mouse sensitivity + Swap sticks) (Validation week) CHANGE: ISX-2377: Rebinding sample improvements (Mouse sensitivity + Swap sticks) (Validation week) Oct 6, 2025
@codecov-github-com
Copy link

codecov-github-com bot commented Oct 6, 2025

Codecov Report

Attention: Patch coverage is 3.12500% with 248 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
Assets/Samples/RebindingUI/RebindActionEditor.cs 0.00% 84 Missing ⚠️
...ets/Samples/RebindingUI/RebindActionParameterUI.cs 0.00% 52 Missing ⚠️
...mples/RebindingUI/RebindActionParameterUIEditor.cs 0.00% 32 Missing ⚠️
Assets/Samples/RebindingUI/RebindSaveLoad.cs 0.00% 30 Missing ⚠️
Assets/Samples/RebindingUI/RequireTouchscreen.cs 0.00% 19 Missing ⚠️
Assets/Samples/RebindingUI/RebindActionUI.cs 15.78% 16 Missing ⚠️
Assets/Samples/RebindingUI/RebindActionUIEditor.cs 0.00% 6 Missing ⚠️
Assets/Samples/RebindingUI/ActionLabelEditor.cs 0.00% 3 Missing ⚠️
Assets/Samples/RebindingUI/InputActionIndicator.cs 0.00% 3 Missing ⚠️
Assets/Samples/RebindingUI/Game/GameplayManager.cs 0.00% 2 Missing ⚠️
... and 1 more
@@             Coverage Diff             @@
##           develop    #2241      +/-   ##
===========================================
- Coverage    76.70%   76.62%   -0.09%     
===========================================
  Files          465      470       +5     
  Lines        87919    88022     +103     
===========================================
+ Hits         67442    67443       +1     
- Misses       20477    20579     +102     
Flag Coverage Δ
inputsystem_MacOS_2021.3 5.91% <ø> (ø)
inputsystem_MacOS_2021.3_project 77.95% <3.12%> (-0.10%) ⬇️
inputsystem_MacOS_2022.3 5.37% <ø> (ø)
inputsystem_MacOS_2022.3_project 74.49% <3.12%> (-0.09%) ⬇️
inputsystem_MacOS_6000.0 5.19% <ø> (ø)
inputsystem_MacOS_6000.0_project 76.41% <3.12%> (-0.09%) ⬇️
inputsystem_MacOS_6000.2 5.19% <ø> (ø)
inputsystem_MacOS_6000.2_project 76.41% <3.12%> (-0.09%) ⬇️
inputsystem_MacOS_6000.3 5.19% <ø> (ø)
inputsystem_MacOS_6000.3_project 76.41% <3.12%> (-0.09%) ⬇️
inputsystem_MacOS_6000.4 5.19% <ø> (ø)
inputsystem_MacOS_6000.4_project 76.41% <3.12%> (-0.09%) ⬇️
inputsystem_Ubuntu_2021.3 5.91% <ø> (ø)
inputsystem_Ubuntu_2021.3_project 77.86% <3.12%> (-0.10%) ⬇️
inputsystem_Ubuntu_2022.3 5.38% <ø> (ø)
inputsystem_Ubuntu_2022.3_project 74.30% <3.12%> (-0.09%) ⬇️
inputsystem_Ubuntu_6000.0 5.19% <ø> (ø)
inputsystem_Ubuntu_6000.0_project 76.23% <3.12%> (-0.09%) ⬇️
inputsystem_Ubuntu_6000.2 5.19% <ø> (ø)
inputsystem_Ubuntu_6000.2_project 76.23% <3.12%> (-0.09%) ⬇️
inputsystem_Ubuntu_6000.3 5.19% <ø> (ø)
inputsystem_Ubuntu_6000.3_project 76.23% <3.12%> (-0.09%) ⬇️
inputsystem_Ubuntu_6000.4 5.19% <ø> (ø)
inputsystem_Ubuntu_6000.4_project 76.23% <3.12%> (-0.10%) ⬇️
inputsystem_Windows_2021.3 5.91% <ø> (ø)
inputsystem_Windows_2021.3_project 78.10% <3.12%> (-0.10%) ⬇️
inputsystem_Windows_2022.3 5.37% <ø> (ø)
inputsystem_Windows_2022.3_project 74.64% <3.12%> (-0.09%) ⬇️
inputsystem_Windows_6000.0 5.19% <ø> (ø)
inputsystem_Windows_6000.0_project 76.55% <3.12%> (-0.09%) ⬇️
inputsystem_Windows_6000.2 5.19% <ø> (ø)
inputsystem_Windows_6000.2_project 76.55% <3.12%> (-0.09%) ⬇️
inputsystem_Windows_6000.3 5.19% <ø> (ø)
inputsystem_Windows_6000.3_project 76.55% <3.12%> (-0.09%) ⬇️
inputsystem_Windows_6000.4 5.19% <ø> (ø)
inputsystem_Windows_6000.4_project 76.55% <3.12%> (-0.09%) ⬇️

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

Files with missing lines Coverage Δ
...ssets/Samples/RebindingUI/InputActionExtensions.cs 83.33% <83.33%> (ø)
Assets/Samples/RebindingUI/Game/GameplayManager.cs 0.00% <0.00%> (ø)
Assets/Samples/RebindingUI/ActionLabelEditor.cs 0.00% <0.00%> (ø)
Assets/Samples/RebindingUI/InputActionIndicator.cs 0.00% <0.00%> (ø)
Assets/Samples/RebindingUI/RebindActionUIEditor.cs 0.00% <0.00%> (ø)
Assets/Samples/RebindingUI/RebindActionUI.cs 55.93% <15.78%> (-3.72%) ⬇️
Assets/Samples/RebindingUI/RequireTouchscreen.cs 0.00% <0.00%> (ø)
Assets/Samples/RebindingUI/RebindSaveLoad.cs 0.00% <0.00%> (ø)
...mples/RebindingUI/RebindActionParameterUIEditor.cs 0.00% <0.00%> (ø)
...ets/Samples/RebindingUI/RebindActionParameterUI.cs 0.00% <0.00%> (ø)
... and 1 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant