- Home /
Stimulate key press via a GUITexture
Dear All,
I have a script which is using W,A,S,D and Up,Down,Left, Right keys to control a character. Now I would like to put the game onto mobile phone using GUI textures as control triggers. I am wondering if there is a way to stimulate key presses. In other words, how do you achieve, that for example I push the "Up" Gui texture and it acts like the Up arrow pushed on PC?
As always I am thanking you in advance for any hint and help.
http://docs.unity3d.com/Documentation/ScriptReference/GUI.Button.html ? You would just have to adjust the already existing code a bit so that either $$anonymous$$eys on a $$anonymous$$B or the GUI call the same code.
Your answer
Follow this Question
Related Questions
Numpad Keypress not being registered on mobile phone. 0 Answers
Panel isn't opening after hitting the tab key, and its not even saying I pressed the key? 0 Answers
How to get Key with KeyCode.Question? 1 Answer
How to create a collider-trigger that will start an animation when you press E 0 Answers
problem with mapping keys through c# 1 Answer