- Home /
Can't see virtual webcam device on Unity 2019 (Ubuntu 16.0.4)
I successfully loopbacked Web cam devices on Ubuntu 16.0.4. I can played virtual cams well via ffplay software or webamtests.com on Ubuntu 16.0.4. However, when I tried to play it on Unity, the Webcamtexture.device can not told me what is the virtual device's name. At the same time, I can recognized the virtual device name via Linux command : V4L2 --list-devices
Who can tell me what's the difference between " V4L2 --list-devices " and "Webcamtextture.device"on Unity 2019.4.30f1. ? Why Unity 2019 can not recognize the correct virtual webcam device name , but Linux V4L2--list -devices command can show and play the virtual webcam devices name.
I doubted Unity 2019 has some bugs on Webcamtextture.device struct, maybe the bottom API of Unity failed to get the correct webcam devices.
Unity WebCamTexture.devices :
WebCamDevice[] wcd = WebCamTexture.devices;
for (int i = 0; i < wcd.Length; i++)
{
SetImage(i, wcd[i].name, _testCam[i].Texture);
}
wcd.Length=5, only 5 real webcam devices were recognized on Unity 2019
Linux Tool : V4L2-ctl --list -devices
9 devices were all correctly recognized (5 real webcams and 4 virtual cams) on Linux V4l2-ctl --list -devices tool