To get started building mixed reality apps with Unity, install the tools.
The fastest path to building a mixed reality app is with Unity. We recommend you take the time to explore the Unity tutorials. If you need assets, Unity has a comprehensive Asset Store. Once you have built up a basic understanding of Unity, you can visit the Mixed Reality Academy to learn the specifics of mixed reality development with Unity. Be sure to visit the Unity Mixed Reality forums to engage with the rest of the community building mixed reality apps in Unity and find solutions to problems you might run into.
If you have an existing Unity project that you're porting to Windows Mixed Reality, follow along with the Unity porting guide to get started.
If you've just created a new Unity project, there are a small set of Unity settings you'll need to change for Windows Mixed Reality, broken down into two categories: per-project and per-scene.
To target Windows Mixed Reality, you first need to set your Unity project to export as a Universal Windows Platform app:
We then need to let Unity know that the app we are trying to export should create an immersive view instead of a 2D view. We do that by enabling "Virtual Reality Supported":
For an app to take advantage of certain functionality, it must declare the appropriate capabilities in its manifest. The manifest declarations can be made in Unity so they are included in every subsequent project export. The setting are found in Player Settings > Windows Store > Publishing Settings > Capabilities. The applicable capabilities for enabling the commonly used APIs for Holographic apps are:
|Capability||APIs requiring capability|
|WebCam||PhotoCapture and VideoCapture|
|PicturesLibrary / VideosLibrary||PhotoCapture or VideoCapture, respectively (when storing the captured content)|
|Microphone||VideoCapture (when capturing audio), DictationRecognizer, GrammarRecognizer, and KeywordRecognizer|
|InternetClient||DictationRecognizer (and to use the Unity Profiler)|
If your app is targeting HoloLens specifically, there are a few settings that need to be changed to optimize for the device's transparent displays, so your app will show through to the physical world:
If you delete and create a new camera, make sure your camera is Tagged as MainCamera.
Once you've configured your project as described above, standard Unity game objects (such as the camera) will light up immediately for a seated-scale experience, with the camera's position updated automatically as the user moves their head through the world.
Your first step should be to review the experience scales that your app can target:
All of the core building blocks for mixed reality apps are exposed in a manner consistent with other Unity APIs:
There are other key features that many mixed reality apps will want to use, which are also exposed to Unity apps:
In addition to this documentation available on the Windows Dev Center, Unity installs documentation for Windows Mixed Reality functionality alongside the Unity Editor. The Unity provided documentation includes two separate sections: