Check out example codes for "two players one phone unity gamne". It will help you in understanding the concepts better.

Code Example 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);

Code Example 2

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

Learn ReactJs, React Native from akashmittal.com