Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: noograss on May 06, 2013, 02:18:57 AM
-
Hi,
I did not find any topic about webcam so i post it here,
I'm currently trying to add a webcam chat to my project, but i'm not able to see the texture from the webcam.
/** code snippet
webcamTexture = new WebCamTexture(WebCamTexture.devices[0].name,requestedWidth,requestedHeight,webcamFPS);
webcamTexture.Play();
w_FrameHolder.Resize(webcamTexture.width, webcamTexture.height);
w_FrameHolder.Apply();
MyWebcam.GetComponent<UITexture>().mainTexture = w_FrameHolder;
**/
The webcam is starting correclty and the uiTexture changes from it's default texture to a grey texture.
What could be the problem ? is it because the webcam texture is not in the collection it cannot be display correctly or m I missing something ?
Thank you,
Max
-
I got it to work, the mistake was mine :)
A boolean was not properly working and it was preventing the texture to be updated thus the grey screen.