I want to create a standalone UWP application that can connect to the Hololens 2 Holographic Remoting Player.
I am using Unity 2019.4.5f1, XR Plugin Management Package 3.2.16, Windows XR Plugin 2.4.1 and Holographic Remoting Player v2.2.3.0.
I can use the Window>XR>Windows XR Plugin Remoting functionality as intended (connect, then press play, then see the hologram on my Hololens). I can also execute the code from the scripting api or the same call the Windows XR Plugin Remoting window uses. When connecting like this before entering Playmode, everything works as if I had used the Windows XR Plugin Remoting window. When executing the code during Playmode, a connection is established but the screen in the Hololens stays black.
Additionally, I have found no way to make even the black screen connection work in a standalone UWP desktop application.
If I check āWindows Mixed Realityā in the XR Plug-in Management settings for UWP, my built application will ask me to connect a MR device when starting.
If I uncheck it, I can start the application but will get an error upon trying to execute the connection code, as XR dlls are not loaded.
Unfortunately, I can only find tutorials for getting Holographic Remoting to work with Legacy XR (by including the ānoneā sdk and then setting āXRSettings.enabled = true;ā). I would love to be able to use Holographic Remoting in a standalone application with the new XR Pipeline, or at least know if this is currently not possible.
Thanks in advance for your help and best regards,
Stella
Would love to know the exact same thing. Iām using Unity 2019.4.13, Windows XR Plugin 2.4.1, XR Plugin Management 3.2.17, Holographic Remoting Player v24.0.0. Holographic Remoting via Editor Playmode works flawless. But when building a standalone UWP application, the application asks to connect a MR device just like @Ozelotl .
Settings in Unity:
Edit->Project Settings-> XR Plug-in Management
PC, Standalone:
Settings in Visual Studio:
-Release
-x64
-LocalMachine
When hitting LocalMachine build while having the Holographic Remoting Player opened, following Error appears:
āCant open app
To use this app, youll need to set up Mixed Reality. Go to Start > Mixed Reality Portal or plug in a compatible headset to get started.ā I donāt even get to the point where I can enter an IP.
Is it possible to have a standalone application with the XRSDK setup? I would really appreciate an answer, as there are no real tutorials or information on this topic.
The reason itās hitting the Headset plug in step is because āInitialize on startupā may be active, if Iām following your descriptions correctly. That will cause the app to look for any valid VR display at launch, but weāre not ready to give it one yet so we need to disable that. The loader MUST be enabled because otherwise our remoting APIās wonāt be accessible, as Ozelotl mentioned seeing in their post about the dlls not loaded.
If you can try the above and let me know if youāre still hitting issues, that would be fantastic. I did scour our bug database and found a matching bug, but it has yet to be verified by our internal QA team and due to COVID-19, some of our bug verification times have been longer than usual as we shift bugs and resources around local government lockdowns and such.
@joejo Stupid me canāt read version names. Iām sorry, Iām running XR Plugin Management 3.2.17 with Unity 2019.4.16f1. I double checked the other versions, these are correct. Thank you for pointing out!
@JasonCostanza Okay, I see progress! Now Iām getting a game preview window with a Connect button and text field to enter the IP address. Unfortunately, the development console gives me a strange error:
Following this error message I researched two things.
Why is the error for āHololens ā1ā remoting pluginā
In checked the HolographicRemoting prefab from MRTK.Tutorials.PCHolographicRemoting.unitypackage, that is responsible for the remote connection. It has a script attached which has the following lines for connecting:
public void Connect()
{
if (HolographicRemoting.ConnectionState != HolographicStreamerConnectionState.Connected)
{
//HolographicRemoting.Connect(IP); //For HL1
HolographicRemoting.Connect(IP, 99999, RemoteDeviceVersion.V2);
}
}
⦠gives probably the answer to why it says āHololens ā1āā?
āDid you enable remoting in Player Settingsā
Well, because Iām using the new XR Plugin, the options in the Player Settings are greyed out of course. As stated in my first post Holographic Remoting is enabled in the Mixed Reality settings.
The option for Holographic remoting is also in the XR Plugin system. If you look in my screenshots, that setting is found under the Windows Mixed Reality loader settings. Go to Project Settings > (under) XR Management > Windows Mixed Reality. Select that and you will get settings pertaining to the WMR loader specifically, in which Holographic Remoting now lives. If that is disabled, that could be the cause of the error youāre getting though I do also not like the text youāre receiving. I will ask our engineer if he can track down that error and confirm my thinking or not.
Note, a lot of our engineers have already taken time off for the holidays so it may take us a while to get a confirmation from them as many are not checking emails or messages at this time.
citing my first post, I guess this already complies with my settings:
Edit->Project Settings-> XR Plug-in Management->Windows Mixed Reality
PC, Standalone:
-Enable Shared Depth Buffer (24bit)
UWP:
-Enable Holographic Remoting
-Enable Shared Depth Buffer (24bit)
I really appreciate the effort and am looking forward to receiving some news on this after the Christmas break. Happy holidays to you guys
Oh I apologize I misread that first post. I just got back from holiday so let me get this back on my radar and Iāll have updates for you soon. I hope you had a happy holiday and new year!
By soon, turns out that means 20 minutes in this case. Updates!
@JimboJonesBL can you search in your project in Visual Studio for MicrosoftHolographicAppRemoting.dll. If that file is missing then somehow your plugin did not install the remoting stuff you need and you should purge the package from your project fully, then re-download the WMR package and re-enable that holographic remoting checkbox and try again.
Hey @JimboJonesBL Letās get you to file a bug report attaching your project and we will take a look to eliminate the back-and-forth exchange. Iām hoping by looking at your project we can give you exact guidance or realize we broke something and will make a fix for you that you can track using your bug report. Howās that sound? Provide the bug number here when you have it and Iāll go intercept it.
I looked into the status more and the bug is assigned to our engineer for fixing. I am not sure if they have begun work on investigating it yet but it is on their plate.
It looks like youāre using the legacy UnityEngine.XR.WSA API, but for XR SDK thereās a new API in the Windows XR Plugin package: Class WindowsMRRemoting | Windows XR Plugin | 2.6.1. I think youāll want to migrate to that one.
I adjusted the connection script with the WindowsMRRemoting class, see attachment. The error from above disappears, unfortunately, another weird error appears:
Checking the log:
Begin showing splash screen.
The referenced script (Microsoft.MixedReality.Toolkit.XRSDK.Oculus.Input.OculusXRSDKDeviceManagerProfile) on this Behaviour is missing!
(Filename: C:\buildslave\unity\build\Runtime/Scripting/ManagedReference/SerializableManagedRef.cpp Line: 199)
The referenced script on this Behaviour (Game Object āā) is missing!
(Filename: C:\buildslave\unity\build\Runtime/Mono/ManagedMonoBehaviourRef.cpp Line: 334)
A scripted object (probably Microsoft.MixedReality.Toolkit.XRSDK.Oculus.Input.OculusXRSDKDeviceManagerProfile?) has a different serialization layout when loading. (Read 64 bytes but expected 148 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
(Filename: C:\buildslave\unity\build\Runtime/Serialize/SerializedFile.cpp Line: 2324)
This error did not halt the application though. I still could enter an IP address and click connect. WindowsMRRemoting.isConnected also returns true, but nothing is displayed on the Hololens2.
Starting the application in Debug mode, I get some exceptions, but they donāt give me a direct hint whatās going on (Full debug log in attachment). The log also shows, that the Connect() call returns false?!
Unfortunately, I wonāt be able to debug this project any longer in depth. But if there is only an error in the connection script I can still check if a solution works.
Sorry for reviving an old thread but does anyone know why HolographicRemoting doesnāt exist under UnityEngine.XR, UnityEngine.XR.WindowsMR, UnityEngine.XR.WSA nor UnityEngine.XR.OpenXR? Iām using OpenXR but canāt connect to the hololense2 in standaloneā¦