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 2017 (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.1.0 .
If you are using Unity 2017, see the integration guide for the HoloToolkit below.

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

    MRTK_BuildSettings.png

VisionLib

  1. Import the vlUnitySDK.unitypackage into your Unity project.
  2. Copy your license file to Assets/StreamingAssets.

Mixed Reality Toolkit

  1. Download the Mixed Reality Toolkit here
  2. Import the Microsoft.MixedReality.Toolkit.Unity.Foundation.unitypackage into the Unity project. Apply requested settings changes.
    MRTK_ApplySettings.png
  3. For testing, you can use the HoloLensSimpleModelTracking scene from VisionLib/Examples/HoloLens. For further developments please make a copy of it to create a custom scene.
  4. Click on Mixed Reality Toolkit in the menu bar and press Add to Scene and Configure...

    MRTK_ConfigureScene.png
  5. From the printed selection dialogue, choose DefaultHoloLens1ConfigurationProfile.

    MRTK_HL1Configuration.png
  6. Add your scene to the build settings and follow the build instructions of the HoloLens Model and Poster Tracker Tutorial

HoloToolkit

It is recommended to use Unity 2017.4 LTS together with the HoloToolkit v1. Note that VisionLib ends its support of Unity 2017.4 in Q1 2020.
This guide has been tested with the HoloToolkit versions 2017.4.1.0 and 2017.4.3.0.

VisionLib

  1. Import the vlUnitySDK.unitypackage into a new Unity project.
  2. Copy your license file to Assets/StreamingAssets and name it license.xml.

HoloToolkit

  1. Download the HoloToolkit here
  2. Import the HoloToolkit-Unity-2017.4.3.0.unitypackage into the Unity project. (Enable Visible Meta Files, if requested)
  3. Configure the Mixed Reality Toolkit in the menu bar under Mixed Reality Toolkit/Configure:
    • Click Apply Mixed Reality Project Settings, leave the default options as shown below and press Apply
      HoloLensConfigureProjectSettings.png
    • Click Apply Mixed Reality Scene Settings, deselect Add the Mixed Reality Camera Prefab as shown below and press Apply
      HoloLensConfigureSceneSettings.png
    • Click Apply UWP Capability Settings, check Webcam and Spatial Perception and any capabilities you want to use in your application (like the microphone for voice commands) and press Apply
      HoloLensConfigureCapabilitySettings.png
  4. Add your scene to the build settings and follow the build instructions of /ref vlUnitySDK_DeployHoloLensApplication