Unity UWP: Holographic Remoting for HoloLens
Asked Answered
P

2

0

I followed this Unity Blog Post tutorial. Everything works in Unity IDE but when I build it, UWP app throws an Exception:

InvalidOperationException: Enable VR Streaming to allow connection to remote holographic device

My Unity Version: 2018.03

Does anybody know any workaround?

Plutonian answered 15/2, 2019 at 17:44 Comment(2)
Have you tried enabling VR streaming?Geometrize
Unfortunately, I do not know how to enable VR streaming!Plutonian
P
0

Here is a solution for it:

As for having Holographic Remoting functionality in Unity UWP build, you should turn on 'WSA Holographic Remoting' in Player XR Setting and load two SDKs, the first one should be set to 'None' and the second one set to 'Windows Mixed Reality'. If you do not do that, your UWP app will be opened in Mixed Reality Portal instead of a normal App.

Be you you load your WindowsMR SDK anywhere in your script in Start() method like this:

private void Start()
{
    StartCoroutine(LoadingWindowsMrWrapper());
}

private IEnumerator LoadingWindowsMrWrapper()
{
    yield return new WaitForSeconds(1);
    StartCoroutine(LoadDevice("WindowsMR"));
}

private static IEnumerator LoadDevice(string newDevice)
{
        XRSettings.LoadDeviceByName(newDevice);
        yield return null;
        XRSettings.enabled = true;
}

If you have a UI Connect button, you can then call your HolographicRemoting.Connect(ipAddress);. By now you should be connected.

Also before application quit be sure you are disconnected.

Let me know if it did not workout for you.

Plutonian answered 18/2, 2019 at 14:0 Comment(0)
A
0

If using the MRTK, use the menu item to apply project settings.

Mixed Reality Toolkit > Configure > Apply Mixed Reality Project Settings

Otherwise, follow Microsofts instructions on working with hololens/Unity, which the tutorial you linked assumed was already done. The key option is likely:

Player Settings > Universal Windows Platform tab > XR Settings group > Virtual Reality Supported 
Adventitious answered 16/2, 2019 at 13:0 Comment(1)
Strange, the error message seemed clear cut to me! If it was me I'd make a new project and follow the instructions I posted and then the tutorial you posted again, in that order, in case the VR setting in your project got corrupted/messed up somehow... Alternatively, I just tested remoting working on the latest Unity 2017 LTS version, but going back to that build might not be ideal...Adventitious
P
0

Here is a solution for it:

As for having Holographic Remoting functionality in Unity UWP build, you should turn on 'WSA Holographic Remoting' in Player XR Setting and load two SDKs, the first one should be set to 'None' and the second one set to 'Windows Mixed Reality'. If you do not do that, your UWP app will be opened in Mixed Reality Portal instead of a normal App.

Be you you load your WindowsMR SDK anywhere in your script in Start() method like this:

private void Start()
{
    StartCoroutine(LoadingWindowsMrWrapper());
}

private IEnumerator LoadingWindowsMrWrapper()
{
    yield return new WaitForSeconds(1);
    StartCoroutine(LoadDevice("WindowsMR"));
}

private static IEnumerator LoadDevice(string newDevice)
{
        XRSettings.LoadDeviceByName(newDevice);
        yield return null;
        XRSettings.enabled = true;
}

If you have a UI Connect button, you can then call your HolographicRemoting.Connect(ipAddress);. By now you should be connected.

Also before application quit be sure you are disconnected.

Let me know if it did not workout for you.

Plutonian answered 18/2, 2019 at 14:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.