Preview and debug your app using Holographic Remoting and Play mode
This article explains the following use case for Holographic Remoting:
- You want to preview and debug your app during the development process: You can run your app locally in the Unity editor on your PC in Play Mode and stream the experience to your HoloLens. This provides a way to quickly debug your app without building and deploying a full project. We call this type of app a Holographic Remoting Play Mode Preview app. Inputs from the HoloLens–gaze, gesture, voice, and spatial mapping–are sent to the PC, where content is rendered in a virtual immersive view. The rendered frames are then sent to the HoloLens.
To learn more about Holographic Remoting, see Holographic Remoting Overview
Note that you can also use Holographic Remoting if you want the resources of a PC to power your app instead of relying on the HoloLens on-board resources.
Set up Holographic Remoting
To use Holographic Remoting, you need to install the Holographic Remoting Player app from the Microsoft Store on your HoloLens (in this article, we’ll refer to it simply as “the Player”). As explained below, after you download and run the app, you’ll see the version number and IP address to connect to. You’ll need v2.4 or later in order to work with the OpenXR plugin.
Holographic Remoting requires a fast PC and Wi-Fi connection. You can find more details in the Holographic Remoting Player article linked above.
The following steps assume that you have already set up your project to use OpenXR (in other words, you’ve imported the required packages and chosen settings for the OpenXR plug-in). If you haven’t yet done this, see our articles describing how to set up a new OpenXR project with MRTK or without MRTK.
- On your HoloLens 2, go to the Microsoft Store and install the Player**.
- On your HoloLens 2, launch and play the Player. Note that on the Start menu, the tile for the Player says Holographic Remoting. After launching the Player, make sure to press the “Play” button which appears in the middle of the Player’s interface.
-
In Unity, on the menu bar, select Mixed Reality > Remoting > Holographic remoting for play mode.
-
In the Holographic Remoting for Play Mode window, in the Remote Host Name box, enter the IP address of your HoloLens 2.
[!TIP]
The IP address of your HoloLens 2 is displayed in the interface of the Player after you click “Play” to start it.
- Change other settings as needed.
-
Click the Enable Holographic Remoting for Play Mode button.
-
Select the Play button to enter Play Mode, and then view the app in your HoloLens 2.
[!TIP]
To debug C# scripts in play mode, attach Visual Studio to Unity.
- On your HoloLens 2, go to the Microsoft Store and install the Player** app.
- On your HoloLens 2, start the Player. Note that on the Start menu, the tile for the Player says Holographic Remoting.
- In Unity, go to the Edit menu and select Project Settings.
- Select XR Plug-in Management.
- Ensure the PC, Mac & Linux Standalone tab is selected, find Windows Mixed Reality in the list, and check its checkbox.
- Next, go to the Window menu, expand the XR submenu, and select Windows XR Plugin Remoting.
- Set Emulation Mode to Remote to Device.
- For Remote Machine, enter the IP address of your HoloLens 2.
- To connect, do one of the following:
- To manually connect, uncheck Connect on Play, and select Connect. You should see Connection Status change to Connected and see the screen go blank in the HoloLens 2.
- To automatically connect, check Connect on Play. The editor will attempt to connect once Play Mode is started.
- Select the Play button to start Play Mode and experience the app on your HoloLens 2. To debug C# scripts in Play mode, attach Visual Studio to Unity.
- On your HoloLens, go to the Microsoft Store and install the Player** app.
- On your HoloLens, start the Player. Note that on the Start menu, the tile for the Player says Holographic Remoting.
- In Unity, go to the Window menu, expand the XR submenu, and select Holographic Emulation (marked as deprecated in Unity 2019).
- Set Emulation Mode to Remote to Device.
- Set Device Version according to if you’re using a first generation HoloLens or a HoloLens 2.
- For Remote Machine, enter the IP address of your HoloLens.
- Select Connect. You should see Connection Status change to Connected and see the screen go blank in the HoloLens.
- Select the Play button to start Play Mode and experience the app on your HoloLens. To debug C# scripts in play mode, attach Visual Studio to Unity.
[!TIP]
For best results, make sure your app properly sets the ../focus point. This helps Holographic Remoting to best adapt your scene to the latency of your wireless connection.
See Also