trying to get my webcam to work but keep receiving this error, “could not connect pins - renderstream() unityengine.stacktraceutility:extractstacktrace” I’m using a Logitech Brio webcam that is plugged into a USB port. I also bought a second webcam (Logitech C920s Pro-HD) to see if it was an issue with the camera but still receiving the same error. I’m assuming that it must be a setting on my computer that not allowing the webcam to work. the built-in webcam in my laptop works fine with the script I’m using but not my USB webcams, basically when I hit play, there is just a blank screen, vs when I us my laptop webcam you can see my surroundings. Please help, I’m new to Unity and really want this to work.
Thank you
Please see below screen shot for additional information
using version 2020.3.27f1
This is the script I’m using.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LiveTexture : MonoBehaviour
{
void Start()
{
WebCamDevice[ ] devices = WebCamTexture.devices;
// for debugging purposes, prints available devices to the console
for (int i = 1; i < devices.Length; i++)
{
print("Webcam available: " + devices*.name);* } Renderer rend = this.GetComponentInChildren(); // assuming the first available WebCam is desired WebCamTexture tex = new WebCamTexture(devices[1].name, 1920, 1080, 30); rend.material.mainTexture = tex; tex.Play(); } }