"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

Enabling/disabling AR camera

Hi!

 

We are currently in the process of updating an old unity project from unity 2019.4.13/vuforia  8.5.9 to unity 2020.3.17/vuforia 10.1.4.

Our app has different functions: one of them uses the normal phone front/back cameras, another uses the vuforia AR camera. We used to be able to disable the AR camera by disabling the VuforiaBehaviour:

Vuforia.VuforiaBehaviour.Instance.enabled = false;

Using Vuforia 10 however, does not seem to release the camera like it used to, making it unavailable to us.

We have tried other ways of stopping the camera/vuforia, but none of those methods seems to release the camera:

Vuforia.VuforiaBehaviour.Instance.VideoBackground.StopVideoBackgroundRendering();
Vuforia.VuforiaApplication.Instance.Deinit();

Is there some other way to achieve what we want?

Hey there,

 

I'm sorry you're facing difficulties with the new API. Instead of calling Vuforia.VuforiaBehaviour.Instance.enabled = false; you can now use: VuforiaBehaviour.Instance.enabled = false;.

Could you validate if that works? 

Hello Patrick,

 

Thank you for your response!

I am afraid your suggested change has not fixed our issue, the result is the same.

Is there something else we can try?

Hello GNieraeth and Pattrick,

I also experienced the same issue, if you find the solution please share.

 

 

 

 

Hi Patrick,

 

Were you able to reproduce the issue using the code I posted earlier?

Hi Patrick,

We're facing the same issues. Any updates?

Hello,

Just a bit of feedback to the thread that I'm actively working with the team on an RCA.

Thanks,

Vuforia Engine Support

Hello @GNieraeth,

The team attempted to replicate the issue using the provided code block. Unfortunately, they were unable to do so on an iPad and Galaxy S20.

Can you (or anyone else) provide feedback on the devices where this is observed?

Thanks,

Hello @wissej,

Thanks for the feedback. I've confirmed that this is an ARCore supported device.

Same issue on my side, reproduced from the editor (in Android mode) using a webcam. I can tell the webcam is "active" because it lits up when capturing any video. Before opening the scene containing the AR camera it's off, then when opening the scene it turns on.