Input Actions not working when adding two keys on binding

as the picture shows with 3 bindings on the same key everything is great but if i add another then it stays looping on hold performed

public void OnCharge(InputAction.CallbackContext context)
    {
        if (context.interaction is HoldInteraction)
        {
            if (context.performed)
            {

                //Charge();
                charged = true;
                Debug.Log("charging");

            }
            if (context.started)
            {

                chargedRelease = false;
                Debug.Log("charging started");

            }
            if (context.canceled)
            {

                Debug.Log("charging canceled");
                chargedRelease = true;
                colChange.ResetColor();

            }
        }
       
    }

write a simple debug and check the log

public void Shoot(InputAction.CallbackContext context)
        {
            if (context.interaction is TapInteraction)
            {
                if (context.performed)
                {
                    Debug.Log("shooting");
                }
                if (context.started)
                {
                    chargedRelease = false;
                    Debug.Log("shooting started");
                }
                if (context.canceled)
                {
                    Debug.Log("shooting canceled");
                }
            }
        }
public void Charge(InputAction.CallbackContext context)
        {
            if (context.interaction is HoldInteraction)
            {
                if (context.performed)
                {
                    Debug.Log("charging");
                }
                if (context.started)
                {
                    Debug.Log("charging started");
                }
                if (context.canceled)
                {
                    Debug.Log("charging canceled");
                }
            }

        }

thank you for the reply but it seems it was a bug. i upgraded to preview 3 1.1.0 and everything works fine now. yeah the canceled never got called before, it stayed in the perfomed loop which i though it was crazy since with one controller only everything worked great but if i added another one then it did that. now i do have the same keys on keyboard and gamepad on different actions and all is ok! thank you!

1 Like