"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

Using Laptop Integrated Camera in Unity Project

Hello everyone,

I am trying to let the Vuforia ARCamera to use the laptop's integrated camera in a Unity project. Inside the Unity editor, I can play the scene showing the camera image with no problem. However, when I build and run project, a black screen will be displayed and an error saying "Failed to start Vuforia"  can be seen in the debug build.

 

The problem disappear when I am working with an external USB camera. I learned that Vuforia has removed the support for the front camera and this seems to cause my issue, but due to the project's requirement, I still need to use the the laptop's integrated camera. I tried a many methods but still not able to get the integrated camera work in a built version. Has anyone been able to solve this issue? Thanks in advance!

 

Below is more detailed information:

I am testing with the ModelTargetStandard scene in the Vuforia Core Samples in the following environment:

  • OS: Windows10
  • Vuforia: 10.10.2
  • Unity: 2021.3.10f1
  • Project platform: UWP

The detail build setting can be found below.

Image removed.

What I see in the Unity editor

Image removed.

and what I see in the build version is like

Image removed.

In the bottom-left corner, the message of the "Failed to start Vuforia" error is displayed.

Image removed.

 

I tried the following methods but ended up in failure:

  1. Add an entry in the webcamprofiles.xml with name 'Integrated Webcam', same as the device name provided by Unity.
  2. In the c# script, set VuforiaConfiguration.Instance.WebCam.DeviceNameSetInEditor = "Integrated Webcam".
  3. In the c# script, set webcamTexture.deviceName = devices[0].name.
  4. Rename the integrated camera to 'HD Web Camera' in windows registry editor.

 

I will really appreciate it if you could help me look into this problem!

 

Chengyuan

 

Hey there,

 

Building for PC is not possible with Vuforia Engine. The webcam is only used for testing purposes in Unity. You can theoretically create a custom driver to use the webcam. Please find additional documentation here:

Attachment