I have developed an app with Vuforia for iOS and Android, when the app is run for the first time, the user is prompted to authorize the use of the device's camera.
If the user does not authorize the camera, when the user navigates to the "capture" scene, the camera view is black.
I have looked at the Untiy3D Documentation and found the Application.HasUserAuthorization class, but if I understand correctly, this only works on the Unity web player?
How can I check if the user has allowed the use of the camera in Unity3D (c#).
Any suggestions would be greatly appreciated! TIA!
As a user on Android I get prompted when installing the apk that it will use the Camera, once I accept that is it. As a developer I don't need to check.
This is how I start the camera using Vuforia API.
CameraDevice.Instance.Stop();
CameraDevice.Instance.Init(CameraDevice.CameraDirection.CAMERA_FRONT);
CameraDevice.Instance.Start();
CameraDevice is a Singleton that you can call.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With