Log in or register to post comments

Manual control over scanning

April 9, 2018 - 11:41pm #1


I am currently developing an AR app for HoloLens (Still a novice with Unity so excuse the question), however for this I'd like to be able to manually start and stop scanning Image Targets.

After looking around I stumbled across a piece of code which should be able to help:



However, where do I place this? And can I bind this to an UI button/voice command?

The intended use would be:

1. Scan Image Target --> When scanned, stop scanning

2. Start WorkInstructions with an UI Button on the canvas with the option to re-scan the target thus starting the loop again.

Thank you in advance,


Manual control over scanning

April 10, 2018 - 11:06am #2

Hello Destros,

That code looks a bit outdated, try this instead:

ObjectTracker tracker = TrackerManager.Instance.GetTracker<ObjectTracker>();
        if (tracker != null)

In terms of where to call this, that is really up to you. As long as Vuforia has been initialized you can call this wherever makes sense. Our samples have some examples of using buttons and other ways to call this code. It'd be worth starting there. If you aren't very familiar with Unity and just need some general pointers for getting started with setting up UI, I'd recommend checking out their website. They have loads of tutorials for using their various features.


Vuforia Support

Log in or register to post comments