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
- ScrollView clips content when under an ancestor that has a filter set
- "Retrieving array element that was out of bounds" error thrown when attempting to remove a column from a Multi-Column List View
- Multi-Column List View horizontal scroll resets to left most position when scrolling vertically
- Floating License is lost for concurrent jobs
- Warning "Failed to insert item" is logged when Assigning Project to Organization's Project in the Project Settings
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