- Home /
Question by
cadow · Jul 23, 2017 at 07:29 PM ·
texture2dwebcamtexturewebcam
Webcam GetPixels is only returning black
Hi,
I try to make a picture with the Webcam, but I only get darkness, what could be wrong? In Start:
WebCamDevice[] devices = WebCamTexture.devices; Debug.Log(devices[0].name); _deviceName = devices[0].name; wct = new WebCamTexture(_deviceName); wct.Play();
In a Coroutine, which is then started with StartCoroutine
Texture2D snap = new Texture2D(wct.width, wct.height); snap.SetPixels(wct.GetPixels()); snap.Apply();
Comment
Your answer
Follow this Question
Related Questions
WebcamTexture not refreshing 0 Answers
Cannot get pixels when webcam is not running 0 Answers
Unity freeze on WebCamTexture Play 0 Answers
Emgu/OpenCV with Unity Free 1 Answer