Log in or register to post comments

Vuforia not re-initializing after de-initializing Hololens

July 22, 2019 - 10:41am #1

Using Vuforia 8.1.11, Unity 2019.1.4f1, and MRTK v2.0.0.

 

I have a scene where vuforia is enabled in the beginning, then at the press of a button Vuforia is disabled, a screenshot from the camera, and use the screenshot as a texture on a quad. This was done by editing this script: https://docs.unity3d.com/ScriptReference/XR.WSA.WebCam.PhotoCaptureFrame.CopyRawImageDataIntoBuffer.html

At the press of a second button it goes to a function that just re-enables Vuforia.

This works when testing on my laptop just fine. But on the Hololens, everything works until re-enabling Vuforia. Vuforia will work in the beginning, but for some reason it won't come back on after the screenshot is taken.

I've tried both  VuforiaRuntime.Instance.Deinit();  and  VuforiaRuntime.Instance.InitVuforia();   ,  and VuforiaBehaviour.Instance.enabled = (true/ false);

Any idea what's going on?

Vuforia not re-initializing after de-initializing Hololens

July 22, 2019 - 1:04pm #2

Never mind, I fixed the problem! Found out you need to dispose of the photo capture object before it will give control of the camera back to vuforia.

 

 

Log in or register to post comments