Skip to content

Conversation

AlexTyrer
Copy link
Contributor

@AlexTyrer AlexTyrer commented Dec 5, 2024

Description

PlayerInput component - ensure any added action map delegates are updated on ActivateInput() (case ISXB-711)

If action maps are added to an asset after the asset has been assigned to the PlayerInput component then the delegates need to be updated.

Before this change no OnXXX callbacks for the newly added ActionMaps were created leading to input loss.

Adding this sync in the ActivateInput() seems like the best compromise.

Testing status & QA

Local testing using supplied user project.
Automated tests

Overall Product Risks

Small change to update the action map callback delegates in ActivateInput.

  • Complexity: 1
  • Halo Effect: 0

Comments to reviewers

None in particular.

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.

…legates are updated on ActivateInput() (case ISXB-711)

If action maps are added to an asset *after* the asset has been assigned to the PlayerInput component then the delegates need to be updated.

Before this change no On<XXX> callbacks were created for the added maps leading to input loss.

Adding this sync in the ActivateInput() seems like the best compromise.
@AlexTyrer AlexTyrer requested a review from ekcoh December 5, 2024 17:48
…set assigned to the PlayerInput component.

o This ensures the delegates for all the action maps in the asset are kept updated when changes are made after initial assignment to the PlayerInputComponent.
Copy link
Collaborator

@ekcoh ekcoh left a comment

Choose a reason for hiding this comment

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

Fix looks good to me, would it be possible to add a test case that covers this scenario to avoid future regression?

@AlexTyrer AlexTyrer merged commit 71f445c into develop Dec 10, 2024
78 checks passed
@AlexTyrer AlexTyrer deleted the isxb-711/fix-player-input-action-map-callback branch December 10, 2024 21:34
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