- Home /
Question by
rehaanahmad · Nov 29, 2014 at 09:58 PM ·
buttonguibuttonpressed
How to detect if a button is continuosly being PRESSED?
With the simple button command as follows, i have been trying to achieve a pressed state.
if (GUI.Button (new Rect (Screen.width/2 - Screen.width/8, Screen.height/2, Screen.width/4, Screen.height/7), "Fold")) {
print("pressing");
}
With the following code, when I press and hold down the button, it only prints pressing once. I want console to print "pressing" continuously as long as I am holding down the button. Is this possible? If so, how? Thanks in advance!
Comment
Your answer
Follow this Question
Related Questions
Can I make my GUI Buttons appear OVER a GUI Window? 1 Answer
Highlighting pressed button 5 Answers
How to know if button was previously pressed 1 Answer
UI Button Pressed color motion don't reset to Normal color 1 Answer
Unity GUI Button Options 0 Answers