Hey !
Is there a way to transfert whatever the webcam is rendering to a RenderTexture ?
Cheers,
Hey !
Is there a way to transfert whatever the webcam is rendering to a RenderTexture ?
Cheers,
public GameObject videoScreen;
private WebCamTexture backCamera;
// Use this for initialization
void Start () {
backCamera = new WebCamTexture();
videoScreen.GetComponent<Renderer>().material.mainTexture = backCamera;
backCamera.Play();
}
here is some tutorial:
private Material renderTexture;
renderTexture.mainTexture = backCamera;
cam.targetTexture = (RenderTexture) renderTexture.mainTexture;