how i can execute any function As long as this button still pressed :
if ( GUI.Button (Rect (160,445,100,50), "Shoot")) {
shoot();
}
on keyboard button i write this code and every thing is very good , but i want to apply this on GUI Button .
if (Input.GetKey ("space"))
{
shoot();
}
please i want an easy method in java script because i still new beinner in unity