void Start() { // Debug print print(selectedCam); print(WebCamTexture.devices[selectedCam].name); // Initialize the webCamTexture and apply the webcam stream on the object webCamTexture = new WebCamTexture(); renderer.material.mainTexture = webCamTexture; webCamTexture.deviceName = WebCamTexture.devices[selectedCam].name; // Start streaming the images captured by the webcam into the texture webCamTexture.Play(); // Initialisation of the bridge components ALVARBridge.alvar_init(webCamTexture.width, webCamTexture.height); data = new Color32[webCamTexture.width * webCamTexture.height]; imageData = new int[data.Length * 3]; }