By emorling
on Thu, 08/31/2017 - 23:10
I would like to pause Vuforia to take a screenshot using the native camera on IOS.
It's not possible to do this without stopping the camera used for Vuforia in Unity.
// stop vuforia
VuforiaBehaviour.Instance.enabled = false;
// start vuforia
VuforiaBehaviour.Instance.enabled = true;
OR
// stop vuforia
CameraDevice.Instance.Stop(); CameraDevice.Instance.Deinit();
// start vuforia
CameraDevice.Instance.Init(CameraDevice.CameraDirection.CAMERA_DEFAULT); CameraDevice.Instance.Start();
Both above approaches work, but the App freezes for 2 seconds as the Camera is re-initialized.
Is there an alternative approach that is faster? That is more PAUSE/RESTART than STOP/PLAY?
Thanks
Hello emorling,
Hello emorling,
There is no way to pause the app in the way you are describing here.
I have been able to get an
I have been able to get an OpenGL texture of the camera image.
However it is flipped vertically. Is this to be expected?
Thanks I will try this for a
Thanks I will try this for a screenshot, but in another use case I need to record a video.
Is there anything else that can be done to pause "the race" for the camera?
Thanks
Can you clarify what you mean
Can you clarify what you mean by "the race" for the camera? If you need something else to access the camera before Vuforia is ready, I'd recommend delaying the initialization of Vuforia until you are ready to use it.
Thanks,
Sorry, by race I mean compete
Sorry, by race I mean compete for the camera.
The problem is I need a sequence like this:
1. Start Vuforia
2. Pause Vuforia, record a video
3. Continue Vuforia