Game programming is an entirely different paradigm for an enterprise application developer in terms of the tools, processes and patterns used. But like any other development engagement, to kick start the development phase and to reduces the learning curve, it is always helpful to have a set of pre-baked tools handy. In the world of HoloLens application development, Microsoft’s Mixed Reality Toolkit is your best companion.
The Mixed Reality Toolkit is an open source project driven by Microsoft. It is a collection of scripts and components which will help developers with initial hurdles they may face, when developing applications for Microsoft HoloLens and Windows Mixed Reality headsets. The source code for this project is shared on the Git Hub.

Importing the source code for the tool set

The Git repository for the Mixed Reality Tool set can be accessed using the following link
https://github.com/Microsoft/MixedRealityToolkit
Following are the steps to clone the code for the toolkit into your VSTS repository

  1. Create a new project on the Visual Studio portal (.visualstudio.com).

MRT1

  1. Give the project a name and chose the version control as ‘Git’

MRT2

  1. On the landing page, pull down ‘Import a repository’ section and click on the import button.

MRT3

  1. Type in the URL for the Git repository (https://github.com/Microsoft/MixedRealityToolkit) and click import.

MRT4

  1. Once imported, the landing page for your repository will look like the image shown below

MRT5

Exploring the source code

The best way to explore the source code for the Mixed Reality Toolkit is by trying out the example scenes. The example scenes are located under the path “Mixed Reality Toolkit/Assets/HoloToolkit-Examples” in the repository.
MRT6
Following are the steps to open an example scene in unity.

  1. Start Unity and open the root folder of the repository which you have cloned on your disk.

MRT7

  1. In the project explorer, navigate to the HoloToolkit-Examples folder. You should see folders with all the example scenes under this path. For this exercise, let’s try out a slider example. Navigate to “Assets/HoloToolkit-Examples/UX/Scenes” folder and double click on the ‘SliderSamples’ scene.

MRT8

  1. You should now see the slider in the game window. Click on the play button to test the scene.

MRT9

Installing the toolkit on a new unity project

The Mixed Reality Toolkit releases a unity package which can be incorporated into your HoloLens unity project. This package helps you configure your project and the scenes with default settings for HoloLens. It also populates your scene with basic objects like camera, input manager, cursor, etc;  Following are the steps to download and install the unity package.

  1. Download the unity package from the following URL

https://github.com/Microsoft/MixedRealityToolkit-Unity/releases

MRT10

  1. Once downloaded, import the package into unity

MRT11

  1. Once imported correctly, you should see the ‘Mixed reality toolkit’ menu on your toolbar

MRT12

  1. Use configure menu to set up the project and the scene settings.

MRT13

Mixed reality toolkit comprises of a very useful collection of tools which lets you kick start a HoloLens project with a template containing basic objects and settings. I will be covering continuous integration and continuous deployment strategies for HoloLens application in my next blog post.

Category:
Application Development and Integration
Tags:
, , , ,