Search Issue Tracker
By Design
Votes
0
Found in [Package]
1.3.0
Issue ID
1398295
Regression
No
[InputSystem] ButtonControl API calls produce duplicate / missing calls when working with Trigger Button
How to reproduce:
1. Open the user attached "InputSystem_TriggerIssue.zip" project
2. Open the "SampleScene" Scene found in the Assets folder
3. Connect an XboxOne or PS4 or PS5 controller
4. Enter Play Mode
5. Open the Console
6. Press the Right Trigger on the controller and release multiple times
Expected result: Consistent counts of "Pressed" and "Released"
Actual result: Inconsistent counts
Reproducible with: 1.1.1 (2019.4.36f1), 1.2.0 (2019.4.36f1, 2022.2.0a3), 1.3.0 (2019.4.36f1, 2020.3.27f1, 2021.2.10f1, 2022.1.0b6, 2022.2.0a3)
Couldn't test with: 1.0.2 - Errors correlating with code
Note:
- Tested with XboxOne controller
- Tested on macOS
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
- UI Builder button text disappears in the GameView when the radius of the button is increased in a specific project
- Paste Settings functionality does not save the pasted settings in volume profile when reloading the project
- Getting a deprecated package for JetBrains Rider pop up when opening or creating a project
- [Android] Volume level of the same audio file is different on Samsung Galaxy Tab A8 between 2023.3.0b3 and 2023.3.0b4
- ‘Expected end of value’ warning occurs when a property declaration includes five or more variable references
Resolution Note:
In the bug the user was checking if(bc.wasPressedThisFrame) {...} else if(bc.wasReleasedThisFrame) {...} from button action callback bound to trigger.
If button was pressed and released in the same frame, it will not be possible to see second part executed.
Actions generally go via different mechanism of action phases, started->performed->canceled. So if we try printing them out like this:
if(context.started)
Debug.Log("Started");
else if(context.performed)
Debug.Log("Performed");
else if(context.canceled)
Debug.Log("Released");
Then in all cases it prints either Started->Performed->Released or Started->Released.