- Home /
Question by
grzrz · Apr 30, 2012 at 11:39 AM ·
cameraresolutionwebcamtexture
webcamtexture not able to set resolution
private WebCamTexture webcamTexture;
void Start()
{
WebCamDevice[] devices = WebCamTexture.devices;
if(devices.Length > 0){
webcamTexture = new WebCamTexture(devices[1].name,1920,1080,30);
webcamTexture.Play();
}
renderer.material.mainTexture = webcamTexture;
webcamTexture.Play();
}
I have 2 cameras - a crappy built-in and logitech c920 (full hd) I want to use that one for the video stream. The funny thing is that when I try to run that as it is here the camera starts to blink and the game freezes until i unplug the camera. When I use
webcamTexture = new WebCamTexture();
webcamTexture.deviceName = devices[1].name;
instead of
webcamTexture = new WebCamTexture(devices[1].name,1920,1080,30);
it works albeit in low resolution.
What should I do?
Comment
Additional info: I plugged a Logitch c910 and when I give it 1280/720/30 it works (its 720p the c920 doesn't work with 1280/720/30 although it should). Idea: Different way of strea$$anonymous$$g data, c920 uses h264 - not supported? Is there more detailed specs-place than reference? I'm a unity noob. What do you think?
Answer by Tony-Sparrow · Oct 08, 2014 at 03:23 AM
highest resolution Unity currently supports is 1280x720