title: How to implement multitouch in Unity3d on mobile device?
body: <p>I use <code>OnMouseDown()</code> to handle pressing, but it is impossible to implement multitouch.</p>
  
  <p>The program includes objects that increase when you tap and then decrease. If there is one touch, everything works fine. But when you try to click on several objects at the same time it's not working.</p>
  
  <p>I am trying to solve the problem, but it's not working, the objects  don't scale and multi-touch doesn't work.</p>
  
  <p>Code:</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  public class OnTouch : MonoBehaviour {
  public AudioClip crash1;
  public AudioClip hat_closed;
  public AudioClip hat_open;
  public bool c;
  public bool c1;
  public bool c2;
  
  void OnMouseDown(){
  
  if (this.name == "clash") {
    GetComponent&lt;AudioSource&gt;().PlayOneShot(hat_open);
    c=true;
  }
  if (this.name == "clash 1") {
    GetComponent&lt;AudioSource&gt;().PlayOneShot(hat_closed);
    c1=true;
  }
  
  if (this.name == "clash 2") {
    GetComponent&lt;AudioSource&gt; ().PlayOneShot (crash1);
    c2=true;
  }           
  
  transform.localScale += new Vector3(0.05f, 0.05f, 0);
  
   }
  
  void Update(){          
  if (c) {transform.localScale = Vector3.Lerp (this.transform.localScale, new Vector3 (0.2f, 0.2f, 0), Time.deltaTime*10f);}
  if (c1) {transform.localScale = Vector3.Lerp (this.transform.localScale, new Vector3 (0.2f, 0.2f, 0), Time.deltaTime*10f);}
  if (c2) {transform.localScale = Vector3.Lerp (this.transform.localScale, new Vector3 (0.25f, 0.25f, 0), Time.deltaTime*10f);}
   }
  }
  </code></pre>