Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCS: updated Interactions doc with tips for multi-interactions #1912

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

smnwttbr
Copy link
Collaborator

@smnwttbr smnwttbr commented Apr 24, 2024

Description

Behaviour can be unexpected when actions use a different ordering of actions. Updated docs to warn the user of this. ISXB-221

Changes made

Paragraph added to docs.

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.

@unity-cla-assistant
Copy link

unity-cla-assistant commented Apr 24, 2024

CLA assistant check
All committers have signed the CLA.

@smnwttbr smnwttbr requested review from ekcoh and duckets April 24, 2024 03:12
@smnwttbr smnwttbr self-assigned this Apr 24, 2024
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.

Looks good to be. I would suggest adding a CHANGELOG.md entry apart from the minor comment. Also PR needs to be converted from Draft into regular PR to signal its ready. Also link the public bug URL in the changelog message (see examples from existing entries).

@smnwttbr smnwttbr marked this pull request as ready for review April 26, 2024 03:21
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.

Changes LGTM based on proposed solution.

@@ -79,6 +79,8 @@ If multiple Interactions are present on a single Binding or Action, then the Inp

At any one time, only one Interaction can be "driving" the action (that is, it gets to determine the action's current [`phase`](../api/UnityEngine.InputSystem.InputAction.html#UnityEngine_InputSystem_InputAction_phase)). If an Interaction higher up in the stack cancels, Interactions lower down in the stack can take over.

Note that the order of interactions can effect which interaction is passed to your callback function. For example, an action with [Tap](#tap), [MultiTap](#multitap) and [Hold](#hold) interactions will have different behaviour when the interactions are in a different order, such as [Hold](#hold), [MultiTap](#multitap) and [Tap](#tap). If you get unexpected behaviour, you may need to experiment with a different ordering.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typo: effect should be affect

Also, can we be more specific about when the order will definitely affect which interaction is passed? Can we give an example so that users understand how what to do rather than having to experiment till it works?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Typo fixed. The example given in the documentation is only one I know of. Right now I couldn't say for sure which orders of interactions would cause unexpected behaviour.

@smnwttbr smnwttbr changed the title updated Interactions doc with tips for multi-interactions docs: updated Interactions doc with tips for multi-interactions May 1, 2024
@smnwttbr smnwttbr changed the title docs: updated Interactions doc with tips for multi-interactions DOCS: updated Interactions doc with tips for multi-interactions May 1, 2024
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.

None yet

4 participants