Unity For



  • Unity World Headquarters 1901 NW Blue Parkway Unity Village, MO 64065 816-524-3550.
  • Unity generates these exceptions by embedding checks for them in the code, so this option decreases performance and increases browser memory usage. Only use this for debugging, and always test in a 64-bit browser. Select Publishing Settings to access Data Caching.
  • This video is a Unity 3D tutorial to teach basics of Unity, to get beginners started with the software.Chapters:0:00 Intro1:06 Creating a Project1:29 Creatin.
-->

You’re here because you want to download Unity, the world’s most popular development platform for creating 2D and 3D multiplatform games and interactive experiences. Before you download choose the version of Unity that’s right for you. Choose your Unity + download Download Unity Hub Learn more about the new Unity Hub here.

Note

This guide assumes you already have installed Unity using the Unity Hub program. If you are new to Unity, we recommend visiting Unity Learn and complete the Unity Essentials learning path first.

Install Unity support for Visual Studio

Visual Studio Tools for Unity is a free extension that provides support for writing and debugging C# and more. Visit the Tools for Unity overview for a complete list of what the extensions includes.

Note

This installation guide is for Visual Studio. If you're using Visual Studio Code, please visit the Unity Development with VS Code documentation.

  1. Download the Visual Studio installer, or run it if already installed.

  2. Click Modify (if already installed) or Install (for new installations) for your desired version of Visual Studio.

  3. On the Workloads tab, scroll to the Gaming section and select the Game development with Unity workload.

Note

Unity For

This installation guide is for Visual Studio for Mac. If you're using Visual Studio Code, please visit the Unity Development with VS Code documentation.

Tools for Unity is included with the installation of Visual Studio for Mac and no separate installation steps are required. You can verify this in the Visual Studio for Mac > Extensions > Game Development menu. Visual Studio for Mac Tools for Unity should be enabled.

Check for updates

It's recommended to keep Visual Studio and Visual Studio for Mac updated so you have the latest bug fixes, features, and Unity support. This doesn't require an update of Unity versions.

  1. Click the Help > Check for Updates menu.

  2. If there is an update available, the Visual Studio Installer will show a new version. Click the Update button.

  1. Click the Visual Studio for Mac > Check for Updates... menu to open the Visual Studio Update dialog.
  2. If there is an update available, click the Install button.

Configure Unity to use Visual Studio

By default, Unity should already be configured to use Visual Studio or Visual Studio for Mac as a script editor. You can confirm this or change the external script editor to a specific version of Visual Studio from the Unity Editor.

  1. In the Unity Editor, select the Edit > Preferences menu..

  2. Select the External Tools tab on the left.

  3. The External Script Editor dropdown list provides a way to choose different installations of Visual Studio. You can also click Browse... from the dropdown list to add an unlisted version.

  4. If Browse... was selected, navigate to the Common7/IDE directory inside your Visual Studio installation directory and select devenv.exe. Then, click Open.

  5. Once Visual Studio is selected in the External Script Editor list, confirm that the Editor Attaching checkbox is selected.

  6. Close the Preferences dialog to complete the configuration process.

  1. In the Unity Editor, select the Unity > Preferences menu..

  2. Select the External Tools tab on the left.

  3. The External Script Editor dropdown list provides a way to choose different installations of Visual Studio. You can also click Browse... from the dropdown list to add an unlisted version.

  4. Close the Preferences dialog to complete the configuration process.

Next steps

To learn how to work with and debug your Unity project in Visual Studio, visit Using Visual Studio Tools for Unity.

-->

The fastest path to building a HoloLens mixed reality app in Unity is with the Mixed Reality Toolkit. If you're brand new to Unity, we recommend that you explore the beginner level tutorials on the Unity Learn platform before continuing. It's also a good idea to visit the comprehensive Asset Store and the Unity Mixed Reality forums to engage with the online community building mixed reality apps. You never know what cool assets or solutions you might find out in the wild. When you're ready to get started with MRTK head to the development checkpoints below!

Important

Take a look at our porting guides if you have an existing Unity project that you want to bring over to HoloLens 2. We have guides for projects that are using HTK, MRTK v1, or SteamVR.

Development checkpoints

Use the following checkpoints to bring your Unity games and applications into the world of mixed reality. If you haven't already explored the Designing Holograms sample application, we recommend downloading and using it to familiarize yourself with the basics of Mixed Reality UX.

1. Getting started

The easiest way to develop in Unity is with the Mixed Reality Toolkit. MRTK will help you automatically setup a project for Mixed Reality and provide a set of features to accelerate your development process. By the end of this section, you'll have a basic understanding of the Mixed Reality Toolkit, a properly configured development environment for Mixed Reality apps, and a working MRTK project in Unity that you built yourself.

CheckpointOutcome
Introducing the Mixed Reality ToolkitBegin your journey by getting acquainted with the Mixed Reality Toolkit and what it has to offer
Download the Mixed Reality Feature ToolA new developer tool for discovering, updating, and adding Mixed Reality feature packages to your Unity projects
Setup your developer environmentDownload and install the latest Unity package and setup your project for mixed reality
Complete the HoloLens 2 tutorial seriesDive into beginner level MRTK tutorials for HoloLens 2 hardware

Important

If you'd like to create 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. Take a look at our configuration guide for more information.

Note

Unity For Students

Once you've setup MRTK in your project, standard Unity game objects like the camera will light up immediately for a seated-scale experience. You can find instructions on changing the experience scale of your application on the coordinate systems page.

2. Core building blocks

All of the core building blocks for mixed reality applications are exposed in a manner consistent with other Unity APIs. These building blocks are available as standalone features and through the Mixed Reality Toolkit. You might not need all of them at once, but we recommend exploring early on. After diving into the core building blocks listed below, you'll have a toolbox full of features you can integrate into a Mixed Reality project by themselves or through MRTK.

FeatureCapabilities
CameraFully optimize visual quality and hologram stability in your Mixed Reality apps
World locking and spatial anchorsSolve stabilization issues, camera adjustment, and integrate a stable coordinate system solution
Shared experiencesView and interact collectively with the same hologram at a fixed point in space using spatial anchor sharing
GazeLet users target holograms with by looking at them
Motion controllersAdd spatial actions to your Mixed Reality apps
GesturesUse hand gestures as input in your Mixed Reality experiences
Hand and eye trackingIntegrate articulated hand and eye tracking input into your user experience
Spatial mappingMap your physical space with a virtual mesh overlay to mark the boundaries of your environment
Spatial soundEnhance your apps with immersive 3D audio
TextGet sharp, high-quality text that has a manageable size and quality rendering
Voice inputCapture spoken keywords, phrases, and dictation from your users

3. Advanced features

For

Other key features that play a role in mixed reality applications are available through Unity APIs without any extra packages or setup. These features can be added to Unity projects with or without MRTK installed. After diving into the more advanced capabilities that Unity offers, you'll be able to build deeper, complex Mixed Reality apps.

FeatureCapabilities
Photo video cameraCapture photos and video content in your Mixed Reality application
Focus pointProvide HoloLens a hint about how to best perform stabilization on the holograms currently being displayed
Tracking lossHandle scenarios where your device can't locate itself in the applications world space
Keyboard inputGet input from real-world and Mixed Reality keyboards in your apps

4. Deploying to a device or emulator

Once you've got your holographic Unity project ready for testing, your next step is to export and build a Unity Visual Studio solution. With that VS solution in hand, you can run your application in one of three ways on a real or simulated device. By the end of this section, you'll be able to deploy your application on whichever device or emulator fits your development needs.

5. Adding services

At this point in your development journey you might be looking to add services or for a helping hand with commercial deployment. Integrating Azure Cloud Services and Dynamics 365 features can level up your projects in a major way. We've compiled a few starting points for you to explore and expand your Mixed Reality knowledge.

Azure Remote Rendering (ARR) is a service that lets you to render highly complex 3D models in real time. ARR is currently in public preview. It can be added to your Unity or Native C++ projects targeting HoloLens 2 or Windows desktop PC.

Azure Spatial Anchors (ASA) is a cross-platform service that allows you to build spatially aware mixed reality applications. With Azure Spatial Anchors, you can map, persist, and share holographic content across multiple devices, at real-world scale.

Unity Technologies Unity

Microsoft Dynamics 365 Guides is a mixed-reality application for Microsoft HoloLens that lets operators learn during the flow of work by providing holographic instructions when and where they are needed. These instruction cards are visually tethered to the place where the work must be done, and can include images, videos, and 3D holographic models.

We also have a comprehensive list of support documentation for additional Azure services that you can add to your Unity projects on a self-serve basis.

What's next?

A developers job is never done, especially when learning a new tool or SDK. The following sections can take you into areas beyond the beginner level material you've already completed, along with helpful resources if you get stuck. Note that these topics and resources aren't in any sequential order, so feel free to jump around and explore!

Porting

If you have existing apps that you'd like to port over, the articles listed below are your next stop:

Unity Forces

Tutorials

If you're looking to add specific Mixed Reality features to your applications, we have several curated tutorials that can run you through the process from end-to-end. Our most popular HoloLens 2 and HoloLens (1st Gen) content is listed below, but you can find the entire collection by visiting the tutorials overview.

Additional resources

Before going out into the world of mixed reality on your own, we recommend taking a look at the MRTK-related documentation listed below. These articles are great jumping off points for understanding how MRTK works in greater detail and will give you insight into making your app more performant.

TopicDescription
MRTK Architecture overviewGet a deeper understanding of how the MRTK SDK works in your projects
Settings and performanceProfile your app, update your Unity settings, and get the best hologram stabilization performance available
Getting started with MRTK + XRTransfer over to the alternative XR pipeline provided by Unity

Unity resources

In addition to this documentation available on docs.microsoft.com, Unity installs documentation for Windows Mixed Reality functionality alongside the Unity Editor. The Unity provided documentation includes two separate sections.

ResourceDescription
Scripting referenceThis section of the documentation contains details of the scripting API that Unity provides and is accessible online from the Unity Editor by clicking Help > Scripting Reference
ManualThis manual is designed to help you learn how to use Unity, from basic to advanced techniques, and is accessible online or from the Unity Editor by clicking Help > Manual

Have feedback?

You can find us on the Unity Forums by tagging Microsoft and a combination of the following tags to help us understand what plugin you're providing feedback for:

Unity Forma

  • HoloLens 2
  • Windows Mixed Reality
  • OpenXR
  • XRSDK
  • Legacy XR

Unity For Beginners

See also