How can I run a XAML Unity App in 3D mode using the Mixed Reality Simulator?

I’m trying to run my Unity UWP App in the Mixed Reality Portal’s simulator, since I haven’t got a physical VR/MR device for the new Windows Mixed Reality platform yet (and cannot run the HoloLens Emulator on my machine).
For reasons of combining 2D Xaml and 3D content, I set my Unity build settings to XAML. As a result my app runs completely in 2D mode in the shell (on a flat panel), even the Virtual Reality Supported option in player settings is checked.

I remember for HoloLens, it was possible to build for XAML instead of D3D in Unity and it still ran as a 3D “immersive” App on the device, correct?

Am I forgetting something here or is the Mixed Reality Portal behaving differently from HoloLens in that aspect, and if so, how will a Virtual Reality Headset (e.g. those announced from Acer, ASUS, Dell, HP, and Lenovo) behave?

I just spoke with the dev that wrote the start-up and lifetime changes for supporting the new headsets, and it seems we didn’t fill out a known issue for this - sorry for any waste of time this may have caused on your end trying to investigate and puzzle out the issue.

The XAML start-up flow hasn’t been completely ironed out yet, so only the D3D flow is supported for non-HoloLens devices at this time.

Hello,

I tried running a XAML app in the Window MR portal using the headset simulation, it appears to work for me just fine. I did notice that the flat app in the 2nd window stays open instead of closing like for D3D. As Andrew said the XAML work flow is still a work progress, thank you for the heads up.

Thank you so far guys for the quick reply,

@unity_andrewc With start-up-flow do you mean running/deploying the app from visual studio? Then I can confirm, that only the D3D-build runs inside the simulator directly, however I can deploy and then start the app using the Mixed Reality Simulators Shell. The result is the app starting in 2D mode (see attached screenshot).

@Unity_Wesley Which version/build of Unity are you using? The stable official version 5.6.2 or the “Unity 5.6 Mixed Reality Technical Preview(MRTP)” that Microsoft Dev portal claims to be needed for non HoloLens MR UWP devices?
I was using 5.6.2f1, creating a minimal scene, build settings changed to Windows Store, UWP Build Type: XAML, Target Device: Any, Player Settings: Virtual Reality Supported > SDKs: Windows Holographic. The result is a 2D flat panel instead of the exclusive/immersive 3D view (See screenshot)
The Microsoft Dev portal (as I only later realized) claims: The public builds of Unity do not yet include support for building mixed reality apps on Windows desktop.
Does that mean I can not yet create XAML apps for MR simulator using Unity UNLESS I’m using the Unity MRTP? Or does your answer imply, that it should work for me anyway and I’m still doing something wrong?
What exactly do you mean with “2nd window”? I only get 1 panel/starter which views my 3D content flat.

I guess I should have asked what version you were on when I first replied. No 5.6 version - not even 2017.1 - is supposed to work with VR HMDs for Windows Mixed Reality.

Except for HoloLens, Windows Mixed Reality is not supported before 2017.2. Anything before that might kind of work in some cases, but that’s just a side effect of how Microsoft’s APIs work - it is not a supported use case, and anything you do see working is basically a coincidence. Do not try to develop Windows Mixed Reality apps (except for ones strictly targeting the HoloLens) on versions of Unity before 2017.2, it’ll only end in tears.

As for the “2nd window”, I think he means the desktop window that gets opened in addition to what gets displayed in the Mixed Reality Portal and what appears in the headset. (He isn’t in the office yet or I’d ask him to be sure before posting.)

1 Like

What Andrew said, he hit the nail on the head.

Okay thank you for getting my head right! I downloaded 2017.1 and 2017.2beta and tried again. While 2017.1 for my XAML problem doesn’t change much, on the new beta version for 2017.2 I can confirm the startup behavior you described! I will continue poking around from there, until hopefully some physical devices soon and the stable release of 2017.2
(any info on when that is? I expect 1-2 months, after 2017.1 was just released yesterday? Or does the new version naming imply monthly updates or anything of the like? Couldn’t find anything on that topic anywhere yet, sorry for kinda off topic question)
Anyway, you may both take a cookie from the jar, since you helped me a lot so far!