You might have heard it – the Mixed Reality Toolkit folks are busy with a major rewrite. The original MRTK was intended to accelerate applications targeted toward HoloLens and (later) Windows Mixed Reality immersive headsets. The new version “aims to further extend the capabilities of the toolkit and also introduce new features, including the capability to support more VR/AR/XR platforms beyond Microsoft's own Mixed Reality setup”.
I’ve been quite busy but finally found some time to play with it. And while I am doing that, I am going to shoot off some smaller and bigger blogs about things I learned – both for myself to remember and you to enjoy.
Be advised: it’s still heavy in development. The first beta release explicitly states:
This is a pre-release version and is not feature complete.
- This release is not intended for production use.
- This release contains many breaking changes from previous HoloToolkit and Mixed Reality Toolkit vNext releases.
So let’s dive in. In this first blog post on this subject, I will simply describe how to set up an empty project.
Cloning the latest MRTK-vNext from GitHub
This is pretty standard procedure. I prefer to use TortoiseGit for this, as I seem to be of the dying creed that’s not particularly fond of command lines. The repo is here (as it has been for a while)
After you have cloned the project, check out branch mrtk_development. This is the bleeding edge. This is where the most things happen (and the most things break ;) ).
Creating a new Unity project
Also fairly standard. You will need Unity 2018.2.18f1 for that. Or, by the time you will read this, probably an ever newer version. After you have created the project, close Unity again.
Adding the MRTK to you project
From the MRKT repo, copy the following folders and files to the assets folder of your project:
Configuring the MRKT-vNext components in your scene
Configuring the MRTK has become a whole lot easier.
- Open and existing scene or create one.
- Click Mixed Reality Toolkit/Configure
- You will see two game objects appear in your scene
Now Unity starts to complain about there being no camera tagged as MainCamera. This can easily be fixetd by tagging it manually:
Basically you know have an empty project
Preparing a custom configuration
If you click the MixedRealityToolkit game object, on the DefaultMixedRealityToolkitConfigurationProfile field:
you will see this this appear in the inspector
If you then click the button “Copy & Customize” it will create a new folder MixedRealityToolkit-Generated, and in that a CustomProfiles folder. And in that a MixedRealityToolkitConfigurationProfile
Make sure to check that the new profile is actually applied:
You will now see that the settings are no long greyed out, and now you can change and swap out components.
The fun thing is, these are not longer all MonoBehaviours and (most of all) no longer singletons. The MixedRealityToolkit class is the only ‘singleton’ left. The MixedRealityToolkitConfigurationProfile is a so called ‘scriptable object’ that can hold the configuration of the whole MRTK. But the MixedRealityToolkitConfigurationProfile is more or less a hat stand for all kinds of other partial configurations, all of which will end up in a profile as well.
We have taken the first (very small) baby steps into configuring the MRTK-vNext. We actually did not write any code and therefore, unlike most of my other posts, this does not come with a sample project. The next one will, though.