How to enable AR Camera and Disable AR Camera

February 20, 2015 - 11:49pm #1

HI,

In Vuforia 3.0.7, we have used the below code for enable and disable AR Camera:

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);

Problem : 

but, In Vuforia 4.0 beta, How to enable/Disable AR Camera ? 

I tried the same code in Vuforia 4.0 beta, but showing an error The name `CameraDevice' does not exist in the current context.

can anyone suggest ? 

It would be great, if i get quick solution.

Thank you,

vamshi

 

 

How to enable AR Camera and Disable AR Camera

February 23, 2015 - 11:05pm #2

You need to use the Vuforia namespace, i.e. add this line at the top of your C# script:

using Vuforia;

 

This is also mentioned in the Migration guide:

https://developer-beta.vuforia.com/library/articles/Solution/How-To-Migrate-a-Unity-Project

Topic locked