Input.GetButtonUp Manual     Reference     Scripting  
Scripting > Runtime Classes > Input
Input.GetButtonUp

static function GetButtonUp (buttonName : string) : bool

Description

Returns true the first frame the user releases the virtual button identified by buttonName.

It will not return true until the user has pressed the button and released it again.

// Instantiates a projectile whenever the user hits the Fire1 Button.
var projectile : GameObject;
function Update () {
if (Input.GetButtonUp ("Fire1")) {
clone = Instantiate (projectile, transform.position, transform.rotation);
}
}

Use this only when implementing action like events eg. shooting a weapon. Use Input.GetAxis for any kind of movement behaviour.