问题
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:
- Added Open Scene
- Build
- Open *.sln file
- Set 'Universal Windows' project as default project.
- Updated [Machine Name/IP] for remote execution
- Run/Start the project using 'Remote Device' (HoloLens 1)
- deployment package was successful
- 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