// Use this for initialization void Start() { int width = 1920; int height = 1080; int fps = 30; cameraControl = new UVCControl(); cameraControl.UseCameraLocate(0x14100000); cameraControl.AutoFocus = false; focus = cameraControl.AbsoluteFocus; contrast = cameraControl.Contrast; WebCamDevice[] devices = WebCamTexture.devices; foreach (WebCamDevice device in devices) { Debug.Log("WebCamDevice " + device.name); } webcamtex = new WebCamTexture(devices[0].name, width, height, fps); // webcamtex = new WebCamTexture(devices[0].name); Renderer _renderer = GetComponent <Renderer>(); _renderer.material.mainTexture = webcamtex; webcamtex.Play(); }
// Use this for initialization void Start() { cameraControl = new UVCControl(); cameraControl.UseCameraLocate(0x14200000); cameraControl.AutoFocus = false; focus = cameraControl.AbsoluteFocus; contrast = cameraControl.Contrast; WebCamDevice[] devices = WebCamTexture.devices; foreach (WebCamDevice device in devices) { Debug.Log("WebCamDevice " + device.name); } webcamtex = new WebCamTexture(devices[1].name); Renderer _renderer = GetComponent <Renderer>(); _renderer.material.mainTexture = webcamtex; webcamtex.Play(); }