By cederache
on Wed, 09/13/2017 - 08:59
Hi everyone,
I'm trying to disable Vuforia ARCamera on the Hololens to allow the device to take a picture and then, I'm re-enabling the camera with the code below :
Disable AR Camera : CameraDevice.Instance.Deinit(); CameraDevice.Instance.Stop();
Enable AR Camera : CameraDevice.Instance.Init(CameraDevice.CameraDirection.CAMERA_BACK); CameraDevice.Instance.Start(); CameraDevice.Instance.SetFocusMode(CameraDevice.FocusMode.FOCUS_MODE_CONTINUOUSAUTO); Debug.Log ("Camera should be working");
But Vuforia seems to be blocked at the line Camera.Device.Instance.Init() and the log below the line Camera.Instance.Init(...) is not displayed in the console.
I'm using Unity 5.6.1 and Vuforia SDK 6.2.10.
Try this. This is the
Try this. This is the solution that works for me.
Disable:
CameraDevice.Instance.Stop();
CameraDevice.Instance.Deinit();
Enable:
CameraDevice.Instance.Init(CameraDevice.CameraDirection.CAMERA_DEFAULT);