Quickstart: Deploy Unity sample to HoloLens
This quickstart covers how to deploy and run the quickstart sample app for Unity to a HoloLens 2.
In this quickstart you'll learn how to:
- Build the quickstart sample app for HoloLens
- Deploy the sample to the device
- Run the sample on the device
Prerequisites
In this quickstart, we'll deploy the sample project from Quickstart: Render a model with Unity. Make sure your credentials are saved properly with the scene and you can connect to a session from within the Unity editor.
The HoloLens 2 must be in developer mode and paired with the desktop machine. Refer to using the device portal for further instructions.
Build the sample project
- Open File > Build Settings.
- Change Platform to Universal Windows Platform
- Set Target Device to HoloLens
- Set Architecture to ARM64
- Set Build Type to D3D Project
- Select Switch to Platform
- When pressing Build (or 'Build And Run'), you'll be asked to select some folder where the solution should be stored
- Open the generated Quickstart.sln with Visual Studio
- Change the configuration to Release and ARM64
- Switch the debugger mode to Remote Machine
- Build the solution
- For the project 'Quickstart', go to Properties > Debugging
- Make sure the configuration Release is active
- Set Debugger to Launch to Remote Machine
- Change Machine Name to the IP of your HoloLens
Launch the sample project
- Connect the HoloLens with a USB cable to your PC.
- Start the Debugger in Visual Studio (F5). It will automatically deploy the app to the device.
The sample app should launch and then start a new session. After a while, the session is ready and the remotely rendered model will appear in front of you. If you want to launch the sample a second time later, you can also find it from the HoloLens start menu now.
Next steps
In the next quickstart, we'll take a look at converting a custom model.
Feedback
Submit and view feedback for