when i release the up arrow key the gui button should appear.when i press up arrow the gui button should dis appear.after the release of the up arrow only i want the gui button should appear.
var a1 = 0;
function Update()
{
if (Input.GetKeyUp (KeyCode.UpArrow))
{
a1 =1;
}
}
function OnGUI()
{
if(a1 == 1)
{
GUI.Button(Rect(100,300,100,50),"button");
}
}
when i release the uparrow the gui button is not appearing immediately. it is appearing after a delay of time or after the three or four time the release of the up arrow. i want the gui button to appear as i first release of the up arrow.