Unity development overview

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 tutorials 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.

To get started building mixed reality apps with Unity, first install the tools.

New Unity Project with Mixed Reality Toolkit

The easiest way to develop in Unity is with the help of Mixed Reality Toolkit. It will help you setup with project automatically, and provide a set of Mixed Reality features to accelerate your development. Please check out Mixed Reality Toolkit v2 to learn more and get started.

Porting an existing Unity app to Windows Mixed Reality

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.

Configuring new Unity project for Windows Mixed Reality

If you'd like to created a new Unity project without importing Mixed Reality Toolkit, there are a small set of Unity settings you'll need to manually change for Windows Mixed Reality, broken down into two categories: per-project and per-scene. See here for step by step guide to Configure new Unity Project for Windows Mixed Reality

Adding mixed reality capabilities and inputs

Once you've setup MRTK V2 with your project, or 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.

Adding support for Windows Mixed Reality features such as spatial stages, gestures, motion controllers or voice input is achieved using APIs built directly into Unity.

Your first step should be to review the experience scales that your app can target:

  • If you're looking to build an orientation-only or seated-scale experience, you'll need to set Unity's tracking space type to Stationary.
  • If you're looking to build a standing-scale or room-scale experience, you'll need to ensure Unity's tracking space type is successfully set to RoomScale.
  • If you're looking to build a world-scale experience on HoloLens, letting users roam beyond 5 meters, you'll need to use the WorldAnchor component.

All of the core building blocks for mixed reality apps are exposed in a manner consistent with other Unity APIs. They are also available through Mixed Reality Toolkit.

There are other key features that many mixed reality apps will want to use, which are also exposed to Unity apps:

Running your Unity project on a real or simulated device

Once you've got your holographic Unity project ready to test out, your next step is to export and build a Unity Visual Studio solution.

With that VS solution in hand, you can then run your app in one of three ways, using either a real or simulated device:

Unity documentation

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:

  1. Unity scripting reference
    • This section of the documentation contains details of the scripting API that Unity provides.
    • Accessible from the Unity Editor through Help > Scripting Reference
  2. Unity manual
    • This manual is designed to help you learn how to use Unity, from basic to advanced techniques.
    • Accessible from the Unity Editor through Help > Manual

See also