Debug and Deploy

This tutorial provides detailed instructions for setting up DXR in Unity for developing XR applications, specifically the debug workflow as well as application deployment.

Below is an example development set-up: Visual Studio (left) is used for vis specs JSON file editing, side-by-side with Unity editor (right), with HoloLens instant preview (bottom right, snapshot from HoloLens view) using Holographic Remoting Player.

Requirements

  • DXR Unity package - latest version can be found in the Download page.
  • Unity Editor - compatible versions can be found in Download page.
  • Text/code editor (e.g., Visual Studio, Atom) - this is needed for editing vis specs JSON files.

Debugging DXR

The following instructions assume you have an open scene with a DXR visualization (DXRVis instance) and your device is set up and connected to the same network as your development computer.

VR Debugging (Immersive Headsets or IHMD)

  1. Make sure your Target Device (under File -> Build Settings) is set to "Any Device" and XR support is enabled (under File -> Build Settings -> Player Settings -> in Inspector window, under XR Settings tab, check Virtual Reality Supported option.
  2. Connect your IHMD to your computer. Open your Mixed Reality Portal.
  3. Add/Edit your DXR visualizations - if you are not familiar with the process, follow this tutorial.
  4. Press play - your Unity editor should run your application but should also show up on your IHMD in VR.

MR Debugging (HoloLens)

  1. Make sure your Target Device (under File -> Build Settings) is set to "HoloLens" and XR support is enabled (under File -> Build Settings -> Player Settings ->UWP tab -> XR Settings -> check Virtual Reality Supported.
  2. Put on your HoloLens and run the Holographic Remoting Player application (install if not yet installed).
  3. In Unity, go to Window -> Holographic Emulation. In the window that pops up, set Emulation Mode to "Remote to Device". Set Remote Machine to your HoloLens IP address (this should show up when you run the Holographic Remoting app). After typing in the IP address, with your cursor still in the Remote Machine form, make sure you press Enter key to submit the IP.
  4. Press "Connect" button. If successful, the window should indicate so. If not, check your connection, e.g., make sure that your computer is on the same network as the HoloLens.
  5. Add/Edit your DXR visualizations - if you are not familiar with the process, follow this tutorial.
  6. Press play - your Unity editor should run your application but should also show up on your HoloLens.

Note: To debug on the Unity Editor only, turn off VR support: File -> Build Settings -> Player Settings -> UWP tab -> XR Settings -> uncheck Virtual Reality Supported.

Device Deployment

These are some guidelines for deploying your application to device. More information can be found here.

MR Deployment (Hololens via WiFi)

  1. Build the solution: File -> Build Settings (set SDK to 10.0.16299.0) -> Build.
  2. Open the generated/updated MS Visual Studio solution (using VS 2017).
  3. In Visual Studio, set the build settings to x86 and Remote Machine: Debug -> Test Properties -> Configuration Properties -> Debugging and set "Machine Name" to your HoloLens IP address. Also make sure "Authentication Type" is set to Universal.
  4. Deploy: Debug -> Start without debugging.

Additional Resources