I have a right, left and up button on the screen (its a 2D game). I am trying to figure out how to write a script so that when the user clicks the buttons, they receive the input and either move the player right left or up. I have watched some tutorials on youtube but they are from a couple of years ago and are out of date and don’t work for me. Could anyone send me a script or tell me how to code it (c#) so that it can recognise the touch input?
thanks, I was actually looking for how to get the input of when a user touches the screen where there will be a button and make that control the player instead of the keyboard as i am trying to make my game have a mobile version equivelant, do you or anyone else know how?
You’re welcome to have a look at how I do it in my proximity_buttons package. All the projects in there should work equally on desktop or mobile as-is.
proximity_buttons is presently hosted at these locations: