Deploy to device in Unreal
There are two ways to deploy an Unreal application to HoloLens 2:
- Directly from the Unreal editor
- As a package uploaded via the device portal
Both options require you to set up your HoloLens to use the device portal for development.
Deploying to device from the Unreal editor
- Select the dropdown arrow next to the Launch button. Initially, the HoloLens device option will be grayed out.
Open the Device Manager and note that your HoloLens won't automatically appear in the device list.
Expand the Add An Unlisted Device section.
Select HoloLens as your Platform.
Enter your devices' IP address and port information separated by a colon as the device identifier. For example, "127.0.0.1:10080" (when connected via USB). Use your Device Portal username and password credentials.
Hit Add and close the device manager.
- If there's an error, such as wrong address or user credentials, a message will print to the Output Log.
- Select the dropdown arrow next to the Launch button again - this time you should see the HoloLens device you just added. Select the HoloLens device to build and deploy to your HoloLens.
Building for the device may involve recompiling shaders (especially on the first run)- this can take a while. Don't let the device go to sleep until the app is running (you may have to wear it). Otherwise shader compilation will fail!
Deploying to device via device portal
You can find detailed instructions on packaging and deploying an app in the Unreal tutorial series.
Next Development Checkpoint
If you're following the Unreal development journey we've laid out, you're in the midst of the deployment stage. From here, you can continue to adding advanced services:
You can always go back to the Unreal development checkpoints at any time.