title | description | author | manager | ms.author | ms.date | ms.topic | ms.service | ms.custom |
---|---|---|---|---|---|---|---|---|
Quickstart: Create a HoloLens app with Unity |
In this quickstart, you learn how to build a HoloLens Unity app using Object Anchors. |
craigktreasure |
virivera |
crtreasu |
09/08/2021 |
quickstart |
azure-object-anchors |
mode-other |
In this quickstart, you'll create a Unity HoloLens app that uses Azure Object Anchors. 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're finished, you'll have a HoloLens app built with Unity that can detect objects in the physical world.
You'll learn how to:
[!div class="checklist"]
- Prepare Unity build settings.
- Export the HoloLens Visual Studio project.
- Deploy the app and run it on a HoloLens 2 device.
[!INCLUDE Unity quickstart prerequisites]
[!INCLUDE Create Account]
[!INCLUDE Unity device setup]
[!INCLUDE Unity upload your model]
[!INCLUDE Clone Sample Repo]
[!INCLUDE Download Unity Package]
In Unity, open the quickstarts/apps/unity/basic
project.
[!INCLUDE Import Unity Package]
[!INCLUDE Configure Account]
[!INCLUDE Unity build sample scene 1]
[!INCLUDE Unity build sample scene 2]
[!INCLUDE Unity build and deploy]
After the Unity splash screen, you'll see a message indicating that the Object Observer has been initialized.
The app looks for objects in the current field of view and then tracks them once detected. An instance will be removed when it's 6 meters away from the user's location. The debug text shows details about an instance, like ID, updated timestamp and surface coverage ratio.
[!INCLUDE Unity troubleshooting]
[!div class="nextstepaction"] Unity HoloLens with MRTK
[!div class="nextstepaction"] Concepts: SDK overview
[!div class="nextstepaction"] FAQ
[!div class="nextstepaction"] Conversion SDK
[!div class="nextstepaction"] Troubleshooting object detection