Start a new topic

Working with external cameras in Windows 10 UWP

I did a couple of tests/tweaks/changes in code to see some additional debug messages to have a more clear picture what is going wrong and I still haven't succeeded to make it work.

Going deeper into details, yes, first I checked provided example "camera controls" and there is a possibility to switch from front to back and vise versa cameras.

This all is working well with Android build (which I also was succeeded to make without any problems), but not in UWP.

In UWP still no cameras are getting detected (even if in the Unity editor these are both working well - laptop integrated one and the USB external one).

I can't see what is going on inside your WikitudeCamera script because

> it is a compiled one and I started to look at things which are available to tweak and I found a script called SimpleInputPluginController.cs This script usage is demonstrated in usage with sample called "Plugins - Simple Custom Camera".

I looked at the method which is suppose to be triggered initially then the scene opens:

protected IEnumerator Initialize() {..} and isnide this method we are

checking for available camera devices using Unity integrated component "WebCamTexture.devices".

I inserted some debug messages all around this method and I find out that for some reasons things are not even going into this method if we are talking about launching it as UWP.

Because of that, I'm thinking that something wrong happening even before this script suppose to be launched.

Similar to this behaviour I was able to receive inside a Unity editor only by following these steps:

1. Open "Camera Controls - Camera Settings" scene in Unity editor.

2. Select a "Web Cam" in Live Preview Mode".

3. Select an external camera for a WebCams field.

4. Save the scene

5. Open "Main Menu" scene.

6. Unplug an external camera.

7. Play the "Main Menu" scene in edittor.

8. Open an "Camera Controls - Camera Settins" using a GUI menu.


1. no camera has been established as a camera for the feed 2. ann

error message which is visible only in unity console saing:

Invalid live preview texture.




So.. I assume that this is exact what is happening then I'm trying to start a deployed app in UWP.

Of course I'm not playing with unplugging cameras, but I'm building a solution which is configured for a default camera or whatever camera (let say camera [0]).

After I'm putting it into a brand new device where it has problems with detecting any camera and just silently shows a black screen without any visible errors (we don't have this unity console here.. so, we don't see it and it doesn't reach our Initialize() {} method full of debug stuff inserted).

Looking forward for your support in solving the case

1 person has this problem
1 Comment

Just checking to see if there is any update to this? I have the same need (USB Camera with UWP). 

Thank you.

Login or Signup to post a comment