Standalone UWP Unity app for holographic remoting? [Unity / UWP / HoloLens Remoting]
Hi,
I am trying to convert an existing HoloLens Unity (2018.2.14f1) application to a standalone holographic remoting application. The holographic remoting works correctly in the Unity editor emulator, but I am unable to get the standalone UWP build to connect to the HoloLens.
I can build the UWP app packages, install it and run it, and the application starts on my Windows 10 PC as expected. If I try to first connect to the remoting service before loading the WindowsMR device (as shown here: https://docs.unity3d.com/2018.2/Documentation/ScriptReference/XR.WSA.HolographicRemoting.html), upon trying to connect to the remote HoloLens (running the remoting client app) I am getting the error "InvalidOperationException: Enable VR Streaming to allow connection to remote holographic device". Loading the WindowsMR device first, and then connecting the remoting just causes the hololens to go blank.
The remoting samples work as expected but these are pure UWP implementations in C++ (https://github.com/Microsoft/MixedRealityCompanionKit/tree/master/RemotingHostSample)but I want to use C# and Unity
I have implemented the code as shown on the Unity documentation. https://docs.unity3d.com/2018.2/Documentation/ScriptReference/XR.WSA.HolographicRemoting.html. In Unity, I have enabled VR support and WSA Holographic Remoting, and I have added the Windows Mixed Reality SDK in XR Settings
Any help would be appreciated greatly! Thanks
Remoting connects successfully (HolographicRemoting.ConnectionState == HolographicStreamerConnectionState.Connected),
Device seems to load (XRSettings.LoadDeviceByName(newDevice); yield return null; XRSettings.enabled = true;) but I simply get a blank screen in the hololens device
- app starts
- remoting connects and green connected shown in the holographic emulation panel
- Windows$$anonymous$$R device loaded
- On hololens, remoting player screen (IP address etc) disappears, blank display
- In editor play window, app is running, no head tracking; camera remains a stationary with no rendering to the device
I have simplified the scene to just a camera, a cube, and the script from https://docs.unity3d.com/2018.2/Documentation/ScriptReference/XR.WSA.HolographicRemoting.html
I have read and followed this https://blogs.unity3d.com/2018/05/30/create-enhanced-3d-visuals-with-holographic-emulation-in-uwp/
I have tried many variations; order of connecting to remoting and device, waiting for longer between connecting and loading the device etc. Grasping at straws now... any further advice would be awesome.. thanks
HoloLens: RS5 update.. OS build 10.0.17763.1
- Holographic remoting player running.. correct IP address confirmed
Unity 2018.2.14f1 (64bit)
- UWP platform selected
- VR supported enabled
- WSA holographic remoting enabled
- XR settings (None, Windows $$anonymous$$ixed Reality)
- Holographic emulation panel open (emulation mode = remote to device)... I start the app in disconnected state and the connected status is enabled successfully from script on play (shown in the emulation panel)
- Tried both IL2CPP and .NET scripting backends
- Tried both .NET 4.x and .NET Standard 2.0 API levels
Note: I have also tried April 2018 RS4 Update (10.0.17134.111) with the same issue. Blank hololens display when loading the Windows$$anonymous$$R device (after remote connection established)
Answer by abuklea · Nov 01, 2018 at 08:17 AM
Following up... (BTW I am using Unity 2018.2.14f1)
After much trial and error I can now connect to holographic remoting in the editor.. both by explicitly pressing the "connect" button in the holographic emulator panel... and also via code using HolographicRemoting.Connect(IP);
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.
I need the "None" entry to be first in the list (followed by WindowsMR) in order for me to run the standalone UWP app on my PC, otherwise the app running on Windows PC immediately prompts me to connect a WindowsMR headset. As I understand it, having "None" as the first entry should allow me to run the standalone UWP app on my PC, I then first connect to the holographic remoting service, then LoadDeviceByName("WindowsMR") after the remoting service has connected. But adding "None" as first in the list causes the above mention problem also on the standalone build in Visual Studio, remoting connects but the HoloLens shows only a blank display. And not having "None" as first in the list causes the app to immediately request for a headset to be connected to the PC.. which I obviously don't want.
Is anyone else experiencing this issue?
FYI I believe the "InvalidOperationException: Enable VR Streaming to allow connection to remote holographic device" error is caused by trying to load the WindowsMR device before connecting to the remoting service.. which makes sense now but I was getting confused due to the problem with adding "None" to the SDK list
Hello abuklea, I'm in the same situation. I'll keep you updated of future updates.
Thanks @francescocagnetta ... that is the first confirmation I have of someone else having this issue :)
I've gotten a response from Unity on this post here: https://forum.unity.com/threads/hololens-remoting-build-gestures-not-recognized.541444/#post-3884479 However still haven't resolved the issue. I've tried reverting OS from RS5 back to RS4, with no joy; same problem.
Good luck.. any further information you find out would be of great help! Thanks
I'm facing the exact same issue. Did you get to solve the problem?
Hi @svenbrunner90 Unfortunately no. And I have has no further response from Unity or on my other question/posts. Frustrating.. however I need to try it with all the latest versions to see if anything has changed or if this issue has been resolved.
What software versions are you using?
Hi @francescocagnetta and @svenbrunner90 Any updates on this issue... Did you manage to solve it?
Your answer
Follow this Question
Related Questions
Why does the holographic remoting not work? 0 Answers
HELP! PLEASE 0 Answers
Unity 2019.4.3 steamvr asset pack - HMD/controllers not being used, defaults to stereo display 1 Answer
Get movement direction according to look direction in VR? 0 Answers
Unity 5 remote not working thogether with Cardboard VR 2 Answers