Hi again, if I put a hold interaction on a button, and hold it more than the defined hold time, I can’t use that button again.
This is how it goes:
context.started triggered when pressing the button - ok
if I just tap the button, or hold less than the hold time:
context.cancelled triggers on button release - ok
if I hold the button for the defined hold time:
context.performed triggered - ok
but context.canceled never triggers when I release the button - not ok
And i never can use that button again after that.
What do I do wrong?
This is my code, I only log the context changes, even removed all my game logic, this is just the button event.
I’m using Unity 2019.4.5f and Input System 1.0.0 from the package manager.
1 Like
This is the output log:
As you can see after holding and releasing, pressing the button again, nothing happens.
Ok, I detected what the problem was:
I had both a gamped button and a keyboard (space) binded to the same action (Jump).
This caused a problem for some reason, removing the gamepad button solves this issue. (JumpHold)
I think it must be a bug tho, because you cannot use a controller button for some reason.
Tried with: PS4 X button, Xbox Controller A button, and Button South gampad, all the same result.
I set action type: pass through, control type: button, and it’s working with controllers too.
So I guess my issue is solved.
Oh wow, this worked for me too. No idea why - definitely seems like a bug but oh well. Thanks a million for following up with your solution!!!