Unity HoloLens App is executed as Windows App instead of AR

好久不见. 提交于 2019-12-10 23:46:53

问题


I am building a HoloLens Unity App using the following tools

  • Unity 2018.3.14f1
  • Visual Studio 2017
  • Microsoft.MixedReality.Toolkit.Unity.Foundation-v2.0.0-RC1-Refresh.unitypackage (MRToolkit v2)

Unity Project/Scene Configuration

  • Target Platform: Universal Windows Platform
  • Target Device: HoloLens
  • Architecture: x86
  • Target SDK Version: Latest
  • Target Platform Version: 10.0.10240.0

Target Platform Settings

  • Supported Device Family: Holographic
  • XR Settings: VR Support (unchecked); WSA Holographic Remoting Support (uncheck)
  • Other Settings:

How I deployed:

  1. Added Open Scene
  2. Build
  3. Open *.sln file
  4. Set 'Universal Windows' project as default project.
  5. Updated [Machine Name/IP] for remote execution
  6. Run/Start the project using 'Remote Device' (HoloLens 1)
    • deployment package was successful
  7. BUT instead of having a CUBE floating in real world, hololens displayed the App as a Windows App.

Did I miss some incorrect configuration?

Under Target Platform maybe? MRToolkit settings? Platform Settings? UWP Settings?

And also i can't find any documentation on how to do a deployment using the latest MRToolkit v2 TO A HOLOLENS 1 DEVICE. If you can share some links it would be great as well

Thank you in advance.


回答1:


You did miss some configuration! You forgot to enable the XR mode in the player settings. In Edit > Project Settings > Player The last option is the XR Settings there you need to set Virtual Reality Supported to true and check you have Windows Mixed Reality as the Virtual Reality SDKs




回答2:


In addition to HoloLady's answer, to deploy to HoloLens 1 with MRTK v2 you may encounter some additional problems on build.

You need to be using the latest Windows Insider preview on your build PC, with the latest Windows SDK installed (18988 works), although seeing as you managed to build it then maybe you already have this.

You'll likely encounter an error whilst trying to run your app that will involve MixedRealityToolkit.Services.InputSimulation.asmdef. A quick fix for this is to navigate to Assets/MixedRealityToolkit.Services/InputSimulation/ in the Unity project and change the .amsdef file to run on any platform. After this, it should run correctly.



来源:https://stackoverflow.com/questions/56160563/unity-hololens-app-is-executed-as-windows-app-instead-of-ar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!