"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Long Initialization Time on HoloLens

I am developing an offline Vuforia app for the HoloLens 2 that requires a delayed initialization. I am able to force Vuforia to wait until I call VuforiaRuntime.Instance.InitVuforia(); However, on the HoloLens, it takes 13 seconds for Vuforia to initialize and finish its tasks. During this time, the entire screen goes blank and I am unable to see any holograms or do anything. In the Unity editor, initialization takes a fraction of a second. 

 

On older forum posts, there is a line of code (VuforiaUnity.SetHint(VuforiaHint.HINT_ASYNC_FETCH_OF_LATEST_CALIBRATION, 1);) that users are told to use, however, Unity does not recognize the VuforiaUnity namespace and the link to the documentation results in a 404. 

 

What can I do to significantly lower the load times for Vuforia initialization? I am using Vuforia 9.8.8 and my image target database only has 8 targets. 

Hello,

I believe the forum post you found is related to this text, which is in the following article: https://library.vuforia.com/articles/Solution/How-To-Migrate-a-Unity-Project.html

Dogfishlab

Wed, 10/13/2021 - 19:09

In reply to by medabit

I should have been more specific in my original post. Unity does not have a problem recognizing the VuforiaUnity namespace, but VuforiaHint. "error CS0103: The name 'VuforiaHint' does not exist in the current context". I am not sure what I should be importing to make that work. 

Finally was able to get it to compile. For those with the same issue as me, you need to put 

VuforiaUnity.SetHint(VuforiaUnity.VuforiaHint.HINT_ASYNC_FETCH_OF_LATEST_CALIBRATION, 1);

Now, it only takes half a second to start and initialize Vuforia.