Log in or register to post comments

ImageTarget works in Unity but not on HoloLens 2

May 27, 2021 - 6:16am #1

I'm developing an application for HoloLens 2 in Unity. I started using Vuforia's ImageTarget, which works fine with a webcam in Unity's Play mode. Also building and deploying to the Hololens 2 succeeds. However, the image target is not recognized on the Hololens. I don't have any other issues with the application.

To set Vuforia up, I followed these guides: https://arvrjourney.com/hololens-2-marker-tracking-with-vuforia-engine-and-mrtk-fb582c8f8ac0 and https://library.vuforia.com/articles/Training/getting-started-with-vuforia-in-unity.html

I'm using the following versions:

Unity 2019.4.26

MRTK 2.6.0

Legacy WSA

Windows Mixed Reality 4.2.3

Vuforia 9.8.8

Also, I'm using the default HoloLens2 profile.


Are there any pitfalls why Vuforia is not working in my case?


ImageTarget works in Unity but not on HoloLens 2

June 6, 2021 - 7:08am #4

I had the same project and i solve it with this script: 


using System.Collections;

using System.Collections.Generic;

using UnityEngine;

using Vuforia;

using UnityEngine.SceneManagement;


public class VuforiaTryScript : DefaultTrackableEventHandler


    protected override  void OnTrackingFound() 


        base.OnTrackingFound ();

        Debug.Log("Image Found");

        SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);    


    protected override void OnTrackingLost() 





ImageTarget works in Unity but not on HoloLens 2

May 28, 2021 - 5:02am #3

Thanks @RolandR for your response. I tried to follow these examples for my own application.

I finally figured it out. I added the Webcam capability in Unity, but somehow it was not added to the `Package.appxmanifest` when I opened it in VS. I ticked the box there and it's doing what it should now.

ImageTarget works in Unity but not on HoloLens 2

May 28, 2021 - 3:43am #2


the steps required to setup the HL with Vuforia Engine are described in the article "Developing Vuforia Engine Apps for HoloLens" and "Working with the HoloLens Sample in Unity"

As test reference please, check the Unity 2019 Asset / example for the HoloLens2?

Does the Vuforia Hololens 1+2 Sample for Unity 2019.4 LTS work on your HL2 device?


Vuforia Engine Support

Log in or register to post comments