Code isn't Recursive in update?

Hey there. I have a problem with a section of code in my weapon script.
Simply put, it won’t call fire multiple times :

void Update() {
	//Updates ammo Meter
	if(ammoBox == 0 && clipBullets == 0)
	{
		lcdMeter.text = "--";
	}
	else
	lcdMeter.text = clipBullets.ToString();
	
	int count = Input.touchCount;
	
	for(int i = 0;i < count; i++)
	{
		Touch touch = Input.GetTouch(i);				
		bool shouldLatchFinger = false;
		Vector2 firstTouch = Vector2.zero;
		
		if(touch.phase == TouchPhase.Began)
		{
			firstTouch = new Vector2(touch.position.x, -touch.position.y + Screen.height);
			print("i");
		}
		else if(touch.phase == TouchPhase.Canceled || touch.phase == TouchPhase.Ended)
		{
			firstTouch = Vector2.zero;
			print(firstTouch);
		}
		
		if(fireButtonRect.Contains(firstTouch))
		{
			print("Fire!");
			// Keep firing until we used up the fire time
            if( prevFire + fireRate <= Time.time) 
		    {
	            FireWeapon();
	            prevFire = Time.time;
	        }
		}
	}
}

The problem is that it doesn’t trigger the “Fire!” continuously. it fire it once…which I really don’t get…

Your problem seems to be the declaration of your firstTouch variable. You declared it inside Update (even inside the touch loop) so it gets reset every time you run through the loop. You set the firstTouch var only at TouchPhase.Began which happens only once when you start touching the display.

Just move the declaration out of Update and put it into your script-scope, that should do the trick.

Are you sure about if( prevFire + fireRate <= Time.time ? Should it be >= ?