Check out example codes for "how to detect a mouse click in unity". It will help you in understanding the concepts better.

Code Example 1

using UnityEngine;
using System.Collections;

		if (Input.GetMouseButtonDown(0))
        {
        	//Left Mouse Button
        }

        if (Input.GetMouseButtonDown(1))
        {
        	//Right Mouse Button
        {

        if (Input.GetMouseButtonDown(2))
        {
        	//Middle Mouse Button
        }

Learn ReactJs, React Native from akashmittal.com