Reputation: 25
I'm using code to switch camera front and back. But now this code does not work. How to fix this?
if (CameraDevice.Instance.GetCameraDirection() == CameraDevice.CameraDirection.CAMERA_BACK)
{
SelectCamera(CameraDevice.CameraDirection.CAMERA_FRONT);
}
else
{
SelectCamera(CameraDevice.CameraDirection.CAMERA_BACK);
}
Upvotes: 0
Views: 1781
Reputation: 1889
As you can see from the Api Reference there is no CameraDirection
in CameraDevice
anymore.
You can try VuforiaConfiguration.Instance.Vuforia.CameraDirection
instead.
More likely it does not work because you updated your Vuforia and front camera is not supported anymore so you should be using older version of Vuforia for this.
Upvotes: 3