"WebCamTexture.Play()" doesn't excute multiple times

I declared 2 WebCamTextures (e.g. webCamA, webCamB)

and did Play(); at each textures.

like

webCamA.Play();
webCamB.Play();

and console shows me error below.
5209508--518468--aaaaa.PNG
these error shows me no hint to solve problem… I cant figure out what do I do next.

with just 1 Play() function, all okay and work well.

It seems like Unity can handle only 1 Play() funtion at a time.

Is there any way to open 2 webcam stream at a time??
not switch I’m making stereoscopic system…

ps. this is my script attatched to 2 quads. (Cam number 0 is for Vive VR)

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class EndoCam_Script : MonoBehaviour
{
    public enum CamIndex { Left, Right }
    public CamIndex EndoCamSource;
    public bool EndoCamON = false;

    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Space)) EndoCamON = !EndoCamON;

        if (EndoCamON)
        {
            GetComponent<Renderer>().enabled = true;
            //Debug.Log("EndoCam ON!");
        }
        else
        {
            GetComponent<Renderer>().enabled = false;
            //Debug.Log("EndoCam OFF!");
        }
    }

    void Start()
    {
        WebCamDevice[] Connected_Camera_devices = WebCamTexture.devices;

        for (int i = 0; i < Connected_Camera_devices.Length; i++)
            Debug.Log(Connected_Camera_devices[i].name + " // Camera number : " + i);


        if (EndoCamSource == CamIndex.Left)
        {
            WebCamTexture endoCamTextureL = new WebCamTexture();
            endoCamTextureL.deviceName = Connected_Camera_devices[1].name;
            Debug.Log("Left Cam ON : " + endoCamTexture.deviceName + "\n");
            GetComponent<Renderer>().material.mainTexture = endoCamTexture;
            endoCamTextureL.Play();
        }
        else
        {
            WebCamTexture endoCamTextureR = new WebCamTexture();
            endoCamTextureR.deviceName = Connected_Camera_devices[2].name;
            Debug.Log("Right Cam ON : " + endoCamTexture.deviceName + "\n");
            GetComponent<Renderer>().material.mainTexture = endoCamTexture; 
            endoCamTextureR.Play();
        }
    }
}

Line 40, 41 - endoCamTexture → endoCamTextureL
Line 48, 49 - endoCamTexture → endoCamTextureR

I cant edit more, system detects editting is spam-like… :stuck_out_tongue:

Solved.

Using 2 cams on same usb hub is a problem.

Unity seems like cant seperate devices on same hub.

Dont use usb hub…