In short Vuforia allows you to recognize 2D or 3D objects inside your application and allows you to map exactly at that position a part of your scene. It uses the camera of your device to do that. It actually locks the camera, since the camera can only be used by one process. In case of HoloLens you are not able to use the camera for other purposes like cognitive services, demonstrations via video streaming, etc. The other issue is that it will use some resources on the background because the process of recognition by Vuforia engine is still active. This can influence the performance of your app.

In older releases of Unity were you had to install Vuforia separately, Vuforia was enabled per scene. Since Vuforia is fully integrated in Unity, it can only be enabled for all the scenes together.

So it is important to turn the behaviour of Vuforia off when it is not needed. There are a numerous of Vuforia classes which allows you to configure Vuforia. And in most cases it is not actually clear how you can turn the behaviourĀ  off or on. Some of the methods even cause Vuforia to become unstable.

But turning the behaviour of Vuforia on or off is very simple. If you have Vuforia enabled in your project it configures some default stuff and adds a specific component to your camera. Open the camera in your hierarchy.

Vuforia-camera

You will notice a component added called “Vuforia Behaviour”. That component controls the behaviour of Vuforia when the app is running.

vuforia-camera-behavior

If you want to turn the behaviour on or off you can simply enable or disable the component. Doing this in code is even simpler. There is an instance of the VuforiaBehaviour object available. By setting the property enabled = true or enabled = false will turn the behavior on and off.

   
    private void SetVuforiaActive(bool vuforiaState)
    {
        VuforiaBehaviour.Instance.enabled = vuforiaState;
    }

As soon as the behaviour is turned off you can use the camera for other purposes and is the Vuforia engine not using any other resources.

Previous articleAugmented Reality applicaties voor mobiele devices als eerste stap naar een HoloLens
Next articleA glimpse of the future with SharePoint Spaces
A professional which inspires, motivates and educates businesses on how to leverage emerging technologies using Virtual, Augmented and Mixed Reality in their journey to digital innovation. He has a strong background on SharePoint, Office 365 and Microsoft Azure and is working with machine learning, artificial intelligence and cognitive services. Primarily focused on manufacturing, construction, industry, logistics and maritime/offshore, his goal is helping businesses to achieve more on creating, improving, smartening and shortening of business processes by using services, apps and devices. Furthermore, he engages in speaking, blogging and is organizer of events like the Mixed Reality User Group, Mixed Reality Talk @ VR, SP&C and the Global AI/MR Bootcamp. With more than 20 years of IT Business experience, acting in different roles like solution architect, he believes the future is just starting! Highly experienced in all realities, HoloLens and other devices, User experiences on devices and connecting the world to the cloud will help him to shape that future!

LEAVE A REPLY

Please enter your comment!
Please enter your name here