Search Issue Tracker
Fixed in 1.1.0-preview.2
Votes
0
Found in [Package]
1.0.0
Issue ID
1287771
Regression
No
Input system - OnScreenButton.OnPointerUp is not called when a GameObject is set to disabled
I'm using the input system to have both touch input (Using the OnScreenButton script) and keyboard input. When i use the touch input i get an error where i need to press on screen buttons twice to trigger it. The key that is assigned as part of OnScreenButton. Even stranger when i use the touch input, the keyboard input is disabled. To get it back i need to click out of the Unity player window (Clicking another part of the editor) then click back into the play window. When i do that it works as expected
Is this known or a bug here ? I'm using Unity 2020.2.0b5 with input system 1.0.0.
2. How can we reproduce it using the example you attached
- Open the project from https://github.cds.internal.unity3d.com/unity/internal-perfect-pixel-adventures/tree/2020.1
- Open the overworld scene
- Usingn the on screen controls go over to the fire object. Press the hand button
- Now press the X on screen button
Notice issue. You need to press the button twice. Space (keyboard interact) is now disabled.
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note (fix version 1.1.0-preview.2):
So, it's a simple bug in OnScreenButton. The "Interact" button in the game is disabled on button press. So OnScreenButton.OnPointerDown sends the press but OnScreenButton.OnPointerUp is never called because by then the GameObject is disabled. I have a fix. Will be in 1.1-preview.2 next week.