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.
To complete this quickstart, make sure you have:
- All prerequisites from either the Unity HoloLens or the Unity HoloLens with MRTK quickstarts.
- Reviewed the general instructions for Holographic remoting.
- Followed the Mixed Reality Feature Tool documentation to set up the tool and learn how to use it.
Minimum component versions
|Component||Unity 2019||Unity 2020|
|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|
- On your HoloLens, install version 2.7.5 or newer of the Holographic Remoting Player via the Microsoft Store.
- 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.
- 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.
- 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.
.oumodel files in
<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
- Launch the Holographic Remoting Player app on your HoloLens. Your device's IP address will be displayed for convenient reference.
- Open your project in the Unity Editor.
- 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.
- 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!
- 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,
falsein Play Mode and other APIs may throw exceptions.