documentation

Mixed Reality Toolkit Integration

Level: Basic

It is possible to use VisionLib together with the Mixed Reality Toolkit from Microsoft. The steps for integrating it in a Unity project together with VisionLib are described below.
Consider also reading the HoloLens Tutorial for more details regarding HoloLens applications with VisionLib.

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.

Preparation

Please make sure that you have installed all required tools and adjusted the settings for HoloLens and Unity Development.

  • Windows 10, Windows 10 SDK, Developer Mode activated
  • HoloLens with activated Developer Mode
  • Visual Studio 2019 (with UWP Tools installed) or higher
  • Unity with .NET/ IL2CPP Scripting Backend

Mixed Reality Toolkit

The Mixed Reality Toolkit is compatible with Unity 2018.4 or higher. This guide has been tested with MRTK v2.5.4 and Unity 2019.4.

  1. In the Build Settings of your project, choose UWP with HoloLens as target device and click Switch Platform.

VisionLib

  1. Import the VisionLib.SDK-Unity.tgz as well as the VisionLib.SDK.HoloLens-Unity.tgz via the package manager.
  2. Copy your license file to Assets/StreamingAssets/VisionLib.

Mixed Reality Toolkit

  1. Download the Mixed Reality Toolkit here (Microsoft.MixedReality.Toolkit.Unity.Foundation.X.Y.Z.unitypackage is required).
  2. Import the Microsoft.MixedReality.Toolkit.Unity.Foundation.unitypackage into the Unity project. Apply requested settings changes.
  3. For testing, you can add the VisionLib.SDK.HoloLens.Examples-Unity.unitypackage via Assets > Import Package > Custom Package and use the HoloLensSimpleModelTracking scene from VisionLib HoloLens Examples/ModelTracking/Scenes.
  4. Click on Mixed Reality Toolkit in the menu bar and press Add to Scene and Configure.... This should add a MixedReality Toolkit GameObject to your scene.
  1. Select this GameObject and select your required configuration profile from the dropdown menu in the inspector. You can also create your own configuration profile.
  1. Add your scene to the build settings and follow the build instructions of the HoloLens Model and Poster Tracker Tutorial