Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. We are looking for your feedback about Templates! Tell us about your experiences by taking our survey.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Can I Play 2 webcams at a time??

Discussion in 'Scripting' started by macbread0625, Nov 22, 2019.

  1. macbread0625

    macbread0625

    Joined:
    Sep 11, 2019
    Posts:
    13
    I success to play 1 cam with Vive VR(like picture below). But I cant do same thing on 2 cams using WebCamTexture.play();.

    nonononono.PNG
    (Left small sqaure is image from usb cam)


    For example, If I assign script below to 2 quads,

    webCamTexture1 = new WebCamTexture(Connected_Camera_devices[1].name);
    ...

    webCamTexture2 = new WebCamTexture(Connected_Camera_devices[2].name);
    ...

    webCamTexture1.Play();
    webCamTexture2.Play();

    Just 2nd quad plays and 1st one is in black(maybe no signal/stream). Even I seperate materials on them.

    If I change order of Play() like,

    webCamTexture2.Play();
    webCamTexture1.Play();

    just 1st quad alive and 2nd one is dead.

    How can I play 2 cams in the same time?

    upload_2019-11-22_17-40-38.png
    3 cams are online.
     
unityunity