Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

could not connect pins - renderstream() unityengine.stacktraceutility:extractstacktrace

Discussion in 'Getting Started' started by mrbf, Jun 21, 2023.

  1. mrbf

    mrbf

    Joined:
    Apr 17, 2023
    Posts:
    1
    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<Renderer>();

    // assuming the first available WebCam is desired
    WebCamTexture tex = new WebCamTexture(devices[1].name, 1920, 1080, 30);
    rend.material.mainTexture = tex;
    tex.Play();
    }
    }

    Screenshot 2023-06-21 110233.png Screenshot 2023-06-21 110358.png Screenshot 2023-06-21 110458.png Screenshot 2023-06-21 110608.png
     
  2. Auriga

    Auriga

    Joined:
    Aug 17, 2013
    Posts:
    5
    Having the same problem but only with 2 different logitech webcams
     
  3. RichAllen2023

    RichAllen2023

    Joined:
    Jul 19, 2016
    Posts:
    1,026
    Use CODE tags when you're displaying code please :D