VisionLib can be used together with Microsoft's Mixed Reality Toolkit (MRTK). The steps for integrating the MRTK and VisionLib in a Unity project are described below. Consider reading the HoloLens Tutorial for more details regarding HoloLens applications with VisionLib.
The Mixed Reality Toolkit package also contains the ModelTracking setup scene for HoloLens 2. This scene can serve as a starting point for development of your own application using VisionLib in combination with the MRTK. For more details on this, see the Tutorial page for the HoloLens2 ModelTracking setup scene.
Note: It is not possible to remote control the HoloLens from Unity when using VisionLib at the moment. You have to deploy your application using Visual Studio to test the tracking properly.
Please ensure you have set up your system for HoloLens Development with Unity as per the following requirements:
This guide has been tested with MRTK v2.8.3 and Unity 2021.3 LTS.
UWP
with HoloLens
as target device and click Switch Platform
.VisionLib
VisionLib.SDK-Unity.tgz
as well as VisionLib.SDK.HoloLens-Unity.tgz
via the package manager.Assets/StreamingAssets/VisionLib
.Mixed Reality Toolkit
MixedRealityFeatureTool.exe
Start
.Project Path
and click Discover Features
.Mixed Reality Toolkit Foundation
and Mixed Reality Toolkit Standard Assets
and click GetFeatures
. Import
and then Approve
to include the Mixed Reality Toolkit
.Microsoft Mixed Reality Feature Tool
by pressing Exit
.MRTK Project Configurator
will be opened. Apply the requested settings changes.VisionLib.SDK.MRTK.Examples-Unity.unitypackage
via Assets > Import Package > Custom Package
and use the HoloLens2ModelTrackingSetup
scene from VisionLib MRTK Examples/TrackingSetup/Scenes
. More details on this scene can be found in the Using the Model Tracking Setup Scene on HoloLens 2