Search Issue Tracker
By Design
Votes
0
Found in [Package]
0.2.10-preview
Issue ID
1164161
Regression
No
[Interactions] InputAction.CallbackContext.interaction does not hold the correct value, when it is set to Default.
The callback function from Input Action holds information about the Interactions settings.
For example, if the Interaction is set to Tap, user can set Max Tap Duration and Press Point. When using default value, the Max Tap Duration is 0.2, and Press Point is 0.5 by default (or whatever value set in the Input System Settings). However, these values are always 0 for InputAction.CallbackContext.interaction.
Repro:
1. Download Package and project: https://github.com/Unity-Technologies/InputSystem
2. Need PR #685 (https://github.com/Unity-Technologies/InputSystem/pull/685)
3. Open scene in Assets -> QA -> Input_Test -> Scenes
4. Enter Playmode. Choose Interactions from the Other Tests dropdown menu on the top.
5. Expand the "More" menu on the right.
6. Press keys marked as Default, and observe the "More" menu
7. Press keys marked with other values, and observe the menu
Actual: When set to Default, all values in InputAction.callbackContext.interaction are 0, which does not reflect the actual number.
Note: this happens to all interactions, except when the value type is string, and the Tap Count for Multi Tap Interaction.
If only some of the values are set to default, only those come back as 0.
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
- Some UXML Template Asset foldouts appear enabled when all fields inside are disabled
- URP Terrain Demo crash on burst_signal_handler after Generating lighting
- Project window button icons are poorly visible and their shades differ in Light theme
- Automatic LOD fails and SRP Batcher incompatibility occurs when using spline-based quad-topology meshes
- Editor crashes on D3D12GetInterface when repeatedly enabling and disabling 256 text components
Resolution Note:
This is by design. 0 means "default value". We could look up the value, but then you would lose information, as you don't know if the field is set to the default or explicitly set to that value. We could make the `durationOrDefault` properties public if needed, but I'm not convinced that we should.
However, I am convinced that our docs need to be better on this, so I opened https://github.com/Unity-Technologies/InputSystem/pull/706