Publish Remote Host Application in Unity for Hololens

I’ve successfully built the Remote Hosting companion demo in visual studio and ran it on my hololens from my PC, very cool! I’m wondering if there is a way to publish an application that supports remote hosting in Unity as well. I can run remote hosting in the unity editor but cannot seem to find a way to publish a self-contained application with this feature. If that is at all possible it would be great because my preference is to develop in Unity! Thanks for your help!

1 Like

Here is a link that might help you:

How / where would I place that code in the Visual Studio project? I’m not sure if the code windows provides is even compatible with what Unity generates. It would be preferable to be able to publish an application straight out of Unity with Remote Host support for Hololens.

There is a link at the bottom of the page I linked above. It shows the git hub that as a example of to use it.

I can get their example to work, however it wasn’t made with Unity, it seems to be written entirely in C++. I’m curious about how I would implement the code into the VS build published out of Unity. I assume that I would have to properly copy and place all of the code into the correct locations of the VS project published from Unity, which requires a bit of reverse engineering how Unity publishes to VS. Is there a way to publish an app in Unity with Remote Host built in for Hololens without having to manually go in and edit the VS file it outputs?

Hi @Pointcloud , I think you are trying to do the same thing as I posted in this thread Holographic remoting running in parallel with another application - Unity Engine - Unity Discussions?

I also needed to enable remoting from a desktop to the Hololens in order to show Unity content from a Desktop in the Hololens, but did not want to use the Unity holographic remoting app to do so since it does not allow other applications to run in parallel in the Hololens when that is running. Is that your goal as well?

I would check out the project Deep Mind, it might help since it sounds similar to what you want to do. They use a server to process all the information from the hololens and separate cameras to read different information.

This might be helpful I think is more of what you might want.

Holographic Remoting Host
This code sample shows how to create a desktop or UWP app that provides holographic content via remoting.

Holographic remoting allows your app to host holographic content on a desktop PC, or on a UWP device such as the XBox One, allowing access to more system resources and making it possible to integrate holographic views into existing desktop PC software. This code sample includes desktop, UWP, and UWP XAML projects that all provide remoting content.

This code sample demonstrates the following features that are required for a holographic remoting host:

  • Establishes a connection with the HoloLens
  • Receives a data stream with input from a HoloLens
  • Renders content in a virtual holographic view
  • Streams content frames back to the HoloLens in real-time

For more info, see the holographic remoting documentation.

Hi @Unity_Wesley … yes the RemotingHostSample works as expected. However as @Pointcloud has mentioned… these demo apps are not built using Unity, but rather as standalone apps in C++.

I am also having trouble building a standalone UWP app from Unity, to run on a Windows 10 PC… and connect to a HoloLens via holographic remoting. I am getting the error “InvalidOperationException: Enable VR Streaming to allow connection to remote holographic device”. It seems it could be an issue with the ordering of connecting to the WindowsMR devices and connecting to the HolographicRemoting service… however no matter what order I do this in the remoting will not work. Calling XRSettings.LoadDeviceByName(“WindowsMR”); first, before connecting to the remoting services does not work. And connecting the remoting (with HolographicRemoting.Connect) before loading the WindowsMR device results in the error above.

It is not at all clear from the Unity or the Microsoft remoting documentations how to build a standalone UWP app from Unity to connect to a HoloLens via holographic remoting.

Please see the question I have posted here: Standalone UWP Unity app for holographic remoting? [Unity / UWP / HoloLens Remoting] - Questions & Answers - Unity Discussions

Currently this question has almost 200 followers, but so far no response… are you able to comment on this issue please?

Thanks for any help you can provide! Cheers

@Unity_Wesley I have narrowed the issues I was having down to including the “None” entry in Virtual Reality SDKs list under XR Settings. If I have only the “Windows Mixed Reality” entry in the list then everything works as expected. As soon as I add “None” (either before or after the WindowsMR entry), the remoting connects to the HoloLens, the remoting window disappears on the hololens, however my application does not appear on the device (blank display). If I remove “None” it works again.

See my full update to my question here: Standalone UWP Unity app for holographic remoting? [Unity / UWP / HoloLens Remoting] - Questions & Answers - Unity Discussions

@Pointcloud are you seeing this same issue?