I'm attempting to upgrade my technique from the classic input methods to the new Input System for Unity; but I'm finding it a little sprawling and unhelpful so far.
I know that if I have an action, let's call it Fire
, and I want it to come from a variety of input devices and call a specific function, let's say Obliterate(InputAction.CallbackContext ctx)
when it's used, all I have to do is something like this:
controls.Player.Fire.performed += ctx => Obliterate(ctx);
However, what if I'm attempting to detect if the button has been not pressed, but released, possibly after some delay? I can't find anything on that, maybe I'm overlooking it. Can someone give me a hand?