How do I select a webcam to use in Unity3D?

0 votes
asked Jul 10 by dctoms (120 points)
Is there a way to select an external, USB based, webcam in Unity, rather than use the inbuilt one.

For example, I am using a Mac that has an inbuilt camera, but I want to use a high quality USB webcam in the Unity3D Editor for resting my project.  Is there a way I can switch between these two cameras?  I tried using the 'External' setting for the ARSession's 'FrameSourceType' but that just gave me the error 'only support mobile phone'.

Any help anyone could give me with this would be much appreciated.  I'm currently moving my workflow to use EasyAR :)

1 Answer

0 votes
answered Jul 12 by zhangpengar (1,780 points)
You can try change ARSession.cs: 97 from

var openResult = easyarCamera.openWithType(CameraDeviceType.Default);

to

var openResult = easyarCamera.openWithIndex(1);
commented Jul 12 by dctoms (120 points)
Thanks for the help zhangpengar, I'll give that a shot when I get a chance and get back to you on whether it worked or not :)
commented Jul 14 by wjrivera (190 points)
this did not work for me =(
Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.
...