two players one phone unity gamne

C#
 if (Input.touchCount == 1) {             Touch touch = Input.GetTouch(0);  else if (Input.touchCount == 2) {             Touch touch = Input.GetTouch(0);              Touch touch2 = Input.GetTouch(1);  if (Input.touchCount == 1) {
   Touch touch = Input.GetTouch(0);
   else if (Input.touchCount == 2) {
     Touch touch = Input.GetTouch(0);
     Touch touch2 = Input.GetTouch(1); 
Source

Also in C#: