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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
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