Quickstart: Upgrade Quickstart app to Unity 2020
In this quickstart, you upgrade a Unity HoloLens app that uses Azure Object Anchors from Unity 2019 to Unity 2020. Azure Object Anchors is a managed cloud service that converts 3D assets into AI models that enable object-aware mixed reality experiences for the HoloLens. When you finish, you'll have a HoloLens app built with Unity that can detect objects in the physical world.
You'll learn how to:
- Upgrade the app from Unity 2019 to Unity 2020.
- Upgrade package dependencies.
- Update Unity build settings.
Prerequisites
To complete this quickstart, make sure you have:
- All prerequisites from either the Unity HoloLens or the Unity HoloLens with MRTK quickstarts
- Unity Hub with Unity 2020.3.8f1 or newer
Open and upgrade the sample project
Follow the steps from either the Unity HoloLens or the Unity HoloLens with MRTK quickstarts to clone the samples repository, and download the Azure Object Anchors package for Unity.
Open Unity Hub. Select Add and pick either the
quickstarts/apps/unity/basic
or thequickstarts/apps/unity/mrtk
project.Under the Unity Version column, select the version of Unity 2020 in the dropdown that you've installed on your computer.
Under the Target Platform column, select Universal Windows Platform.
Select the Project Name column and open the sample in Unity.
You'll see a dialog asking for confirmation to upgrade your project. Select the Confirm button.
Upgrade package dependencies
Once the upgrade process completes, Unity Editor opens.
Follow the Mixed Reality Feature Tool documentation to set up the tool and learn how to use it.
Under Platform Support, install the Mixed Reality OpenXR Plugin feature package, version 1.0.0 or newer, into the Unity project folder.
If you're working with the
quickstarts/apps/unity/mrtk
project, also open the Mixed Reality Toolkit section, locate the Mixed Reality Toolkit Foundation and Mixed Reality Toolkit Tools feature packages, and upgrade them to version 2.7.0 or newer.Go back to your Unity Editor. It might take a few minutes, while the Mixed Reality Feature Tool feature packages are installed.
You'll see a dialog asking for confirmation to enable the new input system. Select Yes.
If you get a dialog asking you to overwrite MRTK shaders, select Yes.
Once the install process completes, Unity restarts automatically.
Update configuration settings
Back in Unity Editor, follow the Configuring XR Plugin Management for OpenXR documentation to set up the XR Plugin Management in your Project Settings. Then, follow the Optimization documentation to apply the recommended project settings for HoloLens 2.
Update MRTK settings
If you're working with the quickstarts/apps/unity/mrtk
project, follow the steps below to adjust MRTK. Otherwise, skip to Build, deploy, and run the app.
In Unity Editor, navigate to
Assets/MixedReality.AzureObjectAnchors/Scenes
, and open AOASampleScene. Under the Hierarchy pane, select MixedRealityToolkit.Under the Inspector pane, select Camera, and change the profile from ObsoleteXRSDKCameraProfile to DefaultMixedRealityCameraProfile.
Still in the Inspector pane, select Input, and expand the Input Data Providers dropdown list. Follow the Configuring MRTK for the XR SDK pipeline documentation to set up the proper input data providers: OpenXRDeviceManager and WindowsMixedRealityDeviceManager.
Build, deploy, and run the app
Your project is now fully upgraded to Unity 2020. Follow the instructions from either the Unity HoloLens or the Unity HoloLens with MRTK quickstarts to build, deploy, and run the app.
Next steps
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for