Search Issue Tracker
By Design
Votes
0
Found in [Package]
Version 1.0.0
Issue ID
1254136
Regression
No
The context.interaction logs Multitap instead of Tap when clicked once
How to reproduce:
1. Open the attached "Multi-tap and tap input functionality (2019.3.15f1)" project
2. Open the Scenes/SampleScene and enter the Play mode
3. Click in the Game view once
Expected: The context.interaction should be of type Tap
Actual: The context.interaction is of type Multitap
Reproducible with: 2018.4.24f1, 2020.2.0a14
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- EditorGUILayout.PropertyField foldout icon inside Vertical Layout Group has an incorrect indent when used with OnInspectorGUI()
- [Android] [iOS] "NullReferenceException: Object reference not set to an instance of an object" throws when entering the Play Mode/opening the application
- The Player freezes on load when building Web platform
- Animator "Conditions" tab breaks when the only Parameter is deleted and another one is created
- "Shader error in 'Universal Render Pipeline/Lit': maximum ps_5_0 sampler register index (16) exceeded" error thrown after a build is completed when the "LOD Cross Fade" parameter is enabled
Resolution Note:
We're chasing a different MultiTap+Tap bug but this particular one behaves as designed. Each interaction goes through a cycle involving a started, a performed, and a canceled phase. When LMB is press, the MultiTap interaction sitting on top of the stack is started and thus a callback on the action is received. When LMB is then released and not pressed again, the MultiTap cancels (without performing) and thus another callback is received.
If the script is modified to read like the following, the MultiTap is never performed except if LMB is in fact double-clicked.
public void Fire(InputAction.CallbackContext context)
{
Debug.Log("Fire!");
if (context.performed && context.interaction is MultiTapInteraction)
Debug.Log( context.interaction );
}