Hello,
So I’ve got my Input System, where for the keyboard, there is a Tap action and a Hold action.
But the hold action only works once per runtime, so I press play, it detects it the first time, then never again. I’ve seen old posts saying that from 1.0.1 to 1.0.2 it’s been fixed, I am tho in the 1.0.2.
public InputManager IM;
void Start(){
IM.Normal.Hold.performed += TST;
}
public void TST(InputAction.CallbackContext context)
{
Debug.Log("HoldPerformed");
}
Edit: It is possible that it was the fact of naming my action “Hold”, I changed the name and it works well now.
Edit2: Still, I got a new error “Cannot find action ‘Normal/Hold[/Mouse/leftButton]’ with ID ‘1b5fe02a-ddfc-4ceb-9b9f-df051673b815’ in 'InputManager (UnityEngine.InputSystem.InputActionAsset)”. As seen that also other users have this issue, I can’t fix it, I hope it does not give me problems.
Edit3: Welp, the original issue happens every time I add more than one key to the same action. If it’s only one key, it works and detects it every time. If I add more than one binding, it stops working.