Skip to content

Conversation

@chris-massie
Copy link
Collaborator

@chris-massie chris-massie commented Feb 9, 2024

Description

Processors such as AxisDeadzone or ScaleVector2 can cause the action's value (obtained with InputAction.ReadValue<TValue>) to be different from the control's magnitude (obtained with InputAction.GetMagnitude). This change makes it explicit that the magnitude is based on the active control to avoid confusion from users.

Changes made

Renamed method added with #1795 in this current 1.8.0-pre.3 that has not yet been released yet. Since it isn't public yet, we should be able to rename.

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.
    • FogBugz ticket attached, example ([case %number%](https://issuetracker.unity3d.com/issues/...)).
    • FogBugz is marked as "Resolved" with next release version correctly set.
  • 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.

Processors on the input action can cause the value to differ from the magnitude, so this change makes it explicit that the magnitude is based on the active control.
@chris-massie chris-massie requested a review from ekcoh February 9, 2024 17:33
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.

LGTM

@ekcoh ekcoh merged commit a280e35 into develop Feb 17, 2024
@ekcoh ekcoh deleted the rename-getmagnitude branch February 17, 2024 06:28
@ekcoh
Copy link
Collaborator

ekcoh commented Feb 17, 2024

@chris-massie I have now merged this PR.

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.

3 participants