I understand that at this point we can use Input.GetKey (“q”) for example to listen to the key strokes.
In AS3 there is this amazing system where we can addEventListener(Keyboard.Event, CallThisFunction) and CallThisFunction() will be called on KeyBoardEvents, but we can later removeEventListener(Keyboard.Event, CallThisFunction) to stop the listener.
I want this because I don’t want the update function to be cluttered with a bunch Input.GetKey’s and also stop Unity from wasting valuable resource detecting Keystrokes.
Is there a way to do this in C# ?