Problem with multi touch

Hi,

I am having a problem on multitouch on android , i have a script for buttons and i have 4 buttons , the problem is when pressing a button then pressing another key that first touch stops working , i have searched much and have tried many times but I couldn’t solve this problem , this is my touch script :

	if(Input.touchCount > 0)
	{
		var touch: Touch = Input.touches[1]; 

		if(touch.phase == TouchPhase.Stationary &&   guiTexture.HitTest(touch.position))
		{
			if(Target)
			{
				Target.SendMessage("Clicked",FunctionNo);
				guiTexture.color = HoldColor;
			}
		}
		
		if(touch.phase == TouchPhase.Ended && guiTexture.HitTest(touch.position))
		{
			if(Target)
			{
				Target.SendMessage("Clicked",-FunctionNo);
				guiTexture.color = NormalColor;
			}
		}
	}

thanks a lot.

Not sure if you fully understand how it works. Touches is an array and you are only querying one element of the array - Input.touches[1];

To work with the array, you need some sort of loop. See doco - http://docs.unity3d.com/Documentation/ScriptReference/Input-touches.html

Hope it helps - only a beginner myself.