"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Play In Editor Mode No Longer Functioning. Freezing Unity

I just recently purchased an El Gato Cam Link.  Before connecting it to my computer, my Vuforia application was able to play in editor using my Logitech c920. Now, after I connected the cam link it will no longer play with the same logitech setup. Instead it Freezes. This issue is persistent on two computers, and is also persistent if I remove my cam link. This is not project specific as I already tried a blank project. It does not freeze Unity when I have no camera plugged in or when Cam Link is plugged in.  Issue 1: It freezes my Unity Editor on both of my computers even when Cam Link Is Not Connected. Issue 2: It does not freeze when Cam Link is plugged in but the Unity Webcam Texture fails to initialize. Oddly it works in a UWP Build without issues. Unity Version 2018.3.6f1 Vuforia 8.0.1 Thank you in advance for your help. 

Hello,

In Play mode, Unity is responsible for providing the camera frames to Vuforia.

Are you able to reproduce this in Unity *without* Vuforia enabled?

Thanks,

Vuforia Engine Support

victoralbenor

Mon, 04/15/2019 - 16:39

In reply to by medabit

Do you mean like using webcamTexture?

If so, yes. In my case, I am able to use webcamTexture in play mode without freezing Unity, if Vuforia is disabled.

Same as @victoralbenor.

So it has something to do with camlink driver compatibility with unity/vuforia i think. Because this issue only happens after CamLink is plugged in.  It does not affect my builds though because they work fine with the CamLink and no freezing. 

Hello @victoralbenor,

Can you also test with a USB webcam to see if it could be related to a driver issue with your embedded webcam?

Unfortunately, we don't have a Dell 7 to see if we can replicate the issue.

Thanks,

Vuforia Engine Support

victoralbenor

Mon, 04/15/2019 - 23:58

@medabit I don't have a proper USB webcam, so I tried using my phone as one, with Droidcam. I found out that the behavior is very inconsistent, here's what happened in my tests:

Hello,

I'm sensitive to the issues you're having with PlayMode using these webcams/adapters. However, there must be thousands of hardware permutations to stream video frames into Unity, all of which we cannot test.

@Medabit Well Unity is freezing due to this. Even when the device is not plugged in. We would love for a potential investigation and fix, or if Vuforia has encountered this before at any time, how was it addressed.

Hello @lwarner,

I'd really like to help here but I'm at a loss for how to reproduce and investigate. We've done a lot of testing of 8.0.X using PlayMode and have not encountered this issue.

Is the issue persistant across all of your dev machines? Are you running Unity on a VM?

@medabit

The steps I did to cause this error:
1. Plug in ElGato CamLink.
2. Unplug all other cameras.
3. Set the ElGato CamLink as the webcam source in Vuforia Configuration.
4. Press play. 
5. Unplug ElGato CamLink.
6. Replug other webcam device.

Hello @lwarner,

Thanks for the details. Is this the product you're using? https://www.elgato.com/en/gaming/cam-link-4k

If so, what are you plugging into the HDMI port?

Thanks,

Vuforia Engine Support

Hello @lwarner,

I'm wondering what resolution you're running when capturing? Vuforia's CV algorithms have to process every camera frame, so if you're capturing 4K @ 60fps this *could* cause significant computational overhead.

@medabit I feel like this issue is similar to when you make an infinite while loop. It completely freezes Unity. 

Hello,

I know this will be an unpopular position, but Vuforia Engine provides support for Unity Play Mode as a convenience feature to devs. And, as such, we cannot guarantee compatibility with every video input device. We know it works with many off-the-shelf USB webcams.