Author Topic: [FIXED ] WebcamTexture + UITexture  (Read 3389 times)

noograss

  • Guest
[FIXED ] WebcamTexture + UITexture
« 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

« Last Edit: May 06, 2013, 02:59:10 AM by noograss »

noograss

  • Guest
Re: WebcamTexture + UITexture [FIXED]
« Reply #1 on: May 06, 2013, 02:58:37 AM »
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.