So i was doing some amateur level coding where i just used input.getkey(“up”), everywhere all over the game.replacing it with methods and adding references everywhere is cumbersome.
Is it possible to create a gameobject which just assigns the working of up arrow key to a gui button.I.e every time i press a gui button, it is equivalent to pressing the up arrow key.,including key release,key press and hold. etc
Good day.
Yea. You need to add Event trigger component to the button. There you can add functions to OnPointerEnter, OnPonterExit, OnPointeDown, etc…
If you dont know exactly how it works, i recommend you to watch some Event trigger component tutorial.
Good luck!