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
Following are the steps to clone the code for the toolkit into your VSTS repository
- Create a new project on the Visual Studio portal (.visualstudio.com).
- Give the project a name and chose the version control as ‘Git’
- On the landing page, pull down ‘Import a repository’ section and click on the import button.
- Type in the URL for the Git repository (https://github.com/Microsoft/MixedRealityToolkit) and click import.
- Once imported, the landing page for your repository will look like the image shown below
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.
Following are the steps to open an example scene in unity.
- Start Unity and open the root folder of the repository which you have cloned on your disk.
- 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.
- You should now see the slider in the game window. Click on the play button to test the scene.
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.
- Download the unity package from the following URL
- Once downloaded, import the package into unity
- Once imported correctly, you should see the ‘Mixed reality toolkit’ menu on your toolbar
- Use configure menu to set up the project and the scene settings.
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.