Skip to content

Commit 6b48e6c

Browse files
authored
DOCS: updated Interactions doc with tips for multi-interactions (#1912)
* updated Interactions doc with tips for multi-interactions
1 parent 27322b1 commit 6b48e6c

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ however, it has to be formatted properly to pass verification tests.
4343
## [1.8.2] - 2024-04-29
4444

4545
### Added
46+
- Documentation to clarify effects of ordering of interactions when a single action has multiple interactions [ISXB-221](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-221).
4647
- Additional tests for UI Input default actions (Navigate, Submit, Scroll etc.)
4748

4849
### Fixed

Packages/com.unity.inputsystem/Documentation~/Interactions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ If multiple Interactions are present on a single Binding or Action, then the Inp
7979

8080
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.
8181

82+
Note that the order of interactions can affect 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.
83+
8284
### Timeouts
8385

8486
Interactions might need to wait a certain time for a specific input to occur or to not occur. An example of this is the [Hold](#hold) interaction which, after a button is pressed, has to wait for a set [duration](../api/UnityEngine.InputSystem.Interactions.HoldInteraction.html#UnityEngine_InputSystem_Interactions_HoldInteraction_duration) until the "hold" is complete. To do this, an interaction installs a timeout using [`SetTimeout`](../api/UnityEngine.InputSystem.InputInteractionContext.html#UnityEngine_InputSystem_InputInteractionContext_SetTimeout_System_Single_).

0 commit comments

Comments
 (0)