Created
April 19, 2022 21:26
-
-
Save smartium/8007c5fcae92d8e54fe8ce9f0152185f to your computer and use it in GitHub Desktop.
Revisions
-
SMARTIUM created this gist
Apr 19, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ WebCamTexture webCamTexture; WebCamDevice[] devices; // List devices devices = WebCamTexture.devices; for (int i = 0; i < devices.Length; i++) Debug.Log(devices[i].name); // Configure WebCam webCamTexture = new WebCamTexture(1280, 720, 30); // Set device webCamTexture.deviceName = devices[1].name; // Start webcam webCamTexture.Play(); // Create and display the destination segmentation image while (webCamTexture.width == 16 || webCamTexture.height == 16) await Task.Yield(); // Display webcam visualizer.Render(webCamTexture);