Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Both cameras stream - android

Discussion in 'AR/VR (XR) Discussion' started by Nassk, Dec 3, 2018.

?

Does android support two webcamtextures reading from different cameras at the same time?

  1. Yes, I'll give you an example:

    0 vote(s)
    0.0%
  2. No, because...

    3 vote(s)
    100.0%
  1. Nassk

    Nassk

    Joined:
    Dec 2, 2018
    Posts:
    1
    Hello to everyone!

    I was searching for a particular thing but couldn't find a solution. I want to build for Android and get both front and back device's cameras output as a texture. I tried using webcamtexture, but it seems that specifically for android the webcamtexture instances are kind of using the same memory or something and two different instances set with the devices different names cannot run at the same time. When I run it on a computer - everything is working fine. I get both streams from different cameras. However, build and run on a mobile is making one of the textures black (i think the last activated webcamtex is working fine and only it).

    Is it the mobile device's architecture that doesn't support two webcamtextures reading from different cameras at the same time?
     
  2. Ecoludologist

    Ecoludologist

    Joined:
    Sep 19, 2013
    Posts:
    5
    I don't have a reason for you, but I can confirm that I'm having the same problem. I have two WebCamTextures called rearCam and frontCam, attached to Camera 0 and Camera 1 respectively, and as soon as I call rearCam.Play(), frontCam.isPlaying becomes false, and vice versa. :(
     
    Nassk and ef0 like this.