Quickstart: Using Unity Remoting with Azure Object Anchors

In this quickstart, you'll learn how to use Unity Remoting with Azure Object Anchors to enable a more efficient inner-loop for application development. With Unity Remoting, you can use Play Mode in the Unity Editor to preview your changes in real time without waiting through a full build and deployment cycle. The latest versions of Unity Remoting and the Object Anchors SDK support using Object Anchors while in Play Mode, so you can detect real physical objects while running inside the Unity Editor.

Prerequisites

To complete this quickstart, make sure you have:

Minimum component versions

Component Unity 2019 Unity 2020
Unity Editor 2019.4.36f1 2020.3.30f1
Windows Mixed Reality XR Plugin 2.9.3 4.6.3
Holographic Remoting Player 2.7.5 2.7.5
Azure Object Anchors SDK 0.19.0 0.19.0
Mixed Reality WinRT Projections 0.5.2009 0.5.2009

One-time setup

  1. On your HoloLens, install version 2.7.5 or newer of the Holographic Remoting Player via the Microsoft Store.
  2. In the Mixed Reality Feature Tool, under the Platform Support section, install the Mixed Reality WinRT Projections feature package, version 0.5.2009 or newer, into your Unity project folder.
  3. In the Unity Package Manager window, ensure that the Windows XR Plugin is updated to version 2.9.3 or newer for Unity 2019, or version 4.6.3 or newer for Unity 2020.
  4. In the Unity Project Settings window, select the XR Plug-in Management section, select the PC Standalone tab, and ensure that the Windows Mixed Reality and Initialize XR on Startup checkboxes are checked.
  5. Place .ou model files in %USERPROFILE%\AppData\LocalLow\<companyname>\<productname> where <companyname> and <productname> match the values in the Player section of your project's Project Settings (for example, Microsoft\AOABasicApp). (See the Windows Editor and Standalone Player section of Unity - Scripting API: Application.persistentDataPath.)

Using Remoting with Object Anchors

  1. Launch the Holographic Remoting Player app on your HoloLens. Your device's IP address will be displayed for convenient reference.
  2. Open your project in the Unity Editor.
  3. Open the Windows XR Plugin Remoting window from the Window/XR menu, select Remote to Device from the drop-down, ensure your device's IP address is entered in the Remote Machine box, and make sure that the Connect on Play checkbox is checked.
  4. Enter and exit Play Mode as needed - Unity will connect to the Player app running on the device, and display your scene in real time! You can iterate on changes in the Editor, use Visual Studio to debug script execution, and do all the normal Unity development activities you're used to in Play Mode!

Known limitations

  • Some Object Anchors SDK features aren't supported since they rely on access to the HoloLens cameras, which isn't currently available via Remoting. These include Active Observation Mode and High Accuracy Tracking Mode.
  • The Object Anchors SDK currently only supports Unity Remoting while using the Windows Mixed Reality XR Plugin. If the OpenXR XR Plugin is used, ObjectObserver.IsSupported will return false in Play Mode and other APIs may throw exceptions.