4

I'm developing an app for the Hololens 1 in Unity, and it runs perfectly fine on the device when using Holographic Remote. However whenever I build and deploy the application through Visual Studio, it then only launches in 2D mode on the Hololens (as a flat "window" you can position in space). What settings control this behaviour?

  • Unity version is 2019.1.4f1,
  • Visual Studio is 2017 Community Edition,
  • I'm on Windows 10.

Developer mode is turned on on both the HL and my desktop. Virtual Reality Support is ticked in Unity, the Mixed Reality SDK is added to the list and the Build settings are on x86 / D3D Project.

I tried replacing my scene with one of the examples from the MRTK, but to no avail. Strangely enough, if I make a clean new project with nothing except the MRTK example in it it does deploy properly, so there must be something in my project interfering. I just can't figure out what.

Expected behaviour is that the application launches in "room scale" mode, i.e. all other applications disappear and the objects in my scene can be viewed in 3D.

EDIT: This has been marked as a possible duplicate. The answers given there do not solve my problem, however. I already made sure that "Virtual Reality Supported" is ticked in the XR settings and the SDK is added to the list. I don't think I have a Windows Insider preview, but since I was able to deploy perfectly fine with a fresh project I don't think that's really the problem...

Jack Mariani
  • 2,270
  • 1
  • 15
  • 30
  • 1
    Possible duplicate of [Unity HoloLens App is executed as Windows App instead of AR](https://stackoverflow.com/questions/56160563/unity-hololens-app-is-executed-as-windows-app-instead-of-ar) – HoloLady Jun 04 '19 at 09:27
  • 1
    The questions are similar (same issue), but I clearly state that Virtual Reality Supported is already ticked in my settings, and the SDK is added. – Miriam Tschanen Jun 04 '19 at 12:49
  • Could you check your `Project Settings >> Player >> Resolution and Presentation`? See if you have `Default is Full Screen` unticked. Not saying this is definitely the case, but it does sound to me like the app is opening in non-fullscreen mode (if there is something like that) – Irek Jun 04 '19 at 13:13
  • we have not seen that issue internally. Do you have a min repro project you are able to share that we can use to investigate? Thanks! – davidkline-ms Jun 04 '19 at 17:30
  • @davidkline-ms Seens Vuforia was partially responsible, see my answer below. Unfortunately I can't share my project as it contains confidential files, but it should be pretty easy to reproduce by creating a new project, adding MRTK and Vuforia to it and configuring it the opposite of what I outline in my solution... – Miriam Tschanen Jun 13 '19 at 07:25

1 Answers1

5

It appears Vuforia was causing the issues. I got it to deploy in 3D with 'Vuforia Augmented Reality Supported' ticked and the following settings in VuforiaConfiguration:

  • Camera Device Mode: MODE_OPTIMIZED_SPEED
  • Device Type: Digital Eyewear
  • Device Config: Hololens
  • Video Background DISABLED
  • Device Tracker DISABLED

Furthermore, 'Vuforia' must not be added to the list of Virtual Reality SDKs in XR Settings.

Note that I have not tried all subsets of these settings individually, some of them might not have an impact whatsoever (except for the last one, I am quite certain adding that SDK will force the app into 2D mode).

Also note that I haven't verified that Vuforia actually works correctly on the Hololens, just that I can deploy the app in 3D mode with it enabled, given the above settings. If someone could confirm that Vuforia is even supported by MRTK v2?

EDIT: apparently the problem is also caused by ticking "WSA Holographic Remoting Supported" in the XR Settings, so be sure to disable that.

  • I love you for that edit. Also, I've seen reports that accidentally having an alpha component in the main camera background color can force it into 2D mode as well; although I have not confirmed this on my own. – Jason C Dec 09 '20 at 00:07