Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find back camera #40

Open
tomret opened this issue Mar 12, 2020 · 3 comments
Open

Unable to find back camera #40

tomret opened this issue Mar 12, 2020 · 3 comments

Comments

@tomret
Copy link

tomret commented Mar 12, 2020

HI,when i operate the project,the UI show “Unable to find back camera”,please tell me how to fix it?

@Syn-McJ
Copy link
Owner

Syn-McJ commented Mar 12, 2020

@tomret
You can try to use the front camera instead. There is an enumeration of cameras in PhoneCamera.Start method, you can add logs and see what cameras are available on your device.

@tomret
Copy link
Author

tomret commented Mar 23, 2020

Hi,I can't find the enum in PhoneCamera.Start method。Besides,i wanna test in PC but it does't work and show me “Unable to find back camera” 。

@Syn-McJ
Copy link
Owner

Syn-McJ commented Mar 23, 2020

@tomret it's not an enum, what I mean is that the camera is picked in the Start method. Change this piece of code:

for(int i = 0; i < devices.Length; i++)
{
     if(!devices[i].isFrontFacing)
     {
           this.backCamera = new WebCamTexture(devices[i].name, Screen.width, Screen.height);
     }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants