Hey everyone, I'm having trouble with my camera switching script for Android. This script works correctly on iOS, but on Android it's not flipping the camera from front to rear when clicked. Here's where it gets weird. If I click to another Unity scene within the app and return to the previous scene the camera will initialize to the camera most recently selected. I.e. I'm using front camera, click the button, nothing happens. I click to my "help" scene and then return to my "viewer" scene and the camera is now rear camera. Any thoughts?
This is the code snippet that I've been using and has been working correctly on iOS... I'm running Android 7.
public void OnSwitchCamera()
if (VuforiaConfiguration.Instance.Vuforia.CameraDirection == CameraDevice.CameraDirection.CAMERA_FRONT)
VuforiaConfiguration.Instance.Vuforia.CameraDirection = CameraDevice.CameraDirection.CAMERA_BACK;
VuforiaConfiguration.Instance.Vuforia.CameraDirection = CameraDevice.CameraDirection.CAMERA_FRONT;