I am using the new Unity Input system for my game.
When I press a key, for example "Q", I want gizmos to be drawn.
However, I can't subscribe to a keypress event with a Gizmo drawing function, because it says it needs to be inside of OnDrawGizmos(). Furthermore, I can't subscribe with that function because it says it doesn't take any parameters, and I need to pass InputAction.CallbackContext context as a parameter, for it to be considered okay by the event system.
Here's the code for how I did it before:
public void OnDrawGizmos()
{
if (Input.GetKey(KeyCode.Q))
{
DrawStuff();
}
}
How can I recreate this?