Quantcast
Channel: Latest Questions by bisciasia
Viewing all articles
Browse latest Browse all 32

check if button is pressed

$
0
0
hi to all. i have a problem with GUI.Button. i created a button like this: GUI.Button(new Rect(0,0,40,40),"up"); for check if button is pressed i do : if(GUI.Button(new Rect(0,0,40,40),"up")) //button press else //button non press my problem is that if i press button for first time code execute is //button press but if i keep hold button code execute is //button non press. somebody can teel me how i can understand if button is pressed? i need this for move my character but i cant use Input.GetAxis because my game run on android. thanks.

Viewing all articles
Browse latest Browse all 32

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>