title: Unity android front camera
body: <p>how could i change this code to access front cam, currently it shows me back cam.? I have tried some different things, but doesn't seem to be working.</p>
  
  <pre><code>    if (isLocalPlayer)
      {
          if (this.gameObject.name == "Player 1") {
              WebCamTexture webcamTexture = new WebCamTexture ();
              Player1Image.GetComponent&lt;RawImage&gt; ().texture = webcamTexture;
              Player1Image.GetComponent&lt;RawImage&gt; ().texture = webcamTexture;
              Player1Image.GetComponent&lt;RawImage&gt; ().material.mainTexture = webcamTexture;
              webcamTexture.Play ();
          } else if (this.gameObject.name == "Player 2") {
              WebCamTexture webcamTexture = new WebCamTexture ();
              Player2Image.GetComponent&lt;RawImage&gt; ().texture = webcamTexture;
              Player2Image.GetComponent&lt;RawImage&gt; ().texture = webcamTexture;
              Player2Image.GetComponent&lt;RawImage&gt; ().material.mainTexture = webcamTexture;
              webcamTexture.Play ();
          } else if (this.gameObject.name == "Player 3") {
              WebCamTexture webcamTexture = new WebCamTexture ();
              Player3Image.GetComponent&lt;RawImage&gt; ().texture = webcamTexture;
              Player3Image.GetComponent&lt;RawImage&gt; ().texture = webcamTexture;
              Player3Image.GetComponent&lt;RawImage&gt; ().material.mainTexture = webcamTexture;
              webcamTexture.Play ();
          } else if (this.gameObject.name == "Player 4") {
              WebCamTexture webcamTexture = new WebCamTexture ();
              Player4Image.GetComponent&lt;RawImage&gt; ().texture = webcamTexture;
              Player4Image.GetComponent&lt;RawImage&gt; ().texture = webcamTexture;
              Player4Image.GetComponent&lt;RawImage&gt; ().material.mainTexture = webcamTexture;
              webcamTexture.Play ();
          } else {
              Debug.Log ("All slots full!");
              GameObject.Destroy (this);
              Network.Disconnect ();
          }
  
  
      }
  </code></pre>