我正在运行 Visual Studio 2015 更新 3、Unity 5.6.3f1、全息模拟器 10.0.14393.1358 和 Windows 10 SDK 10.0.14393.798。我正在学习 HoloLens 开发基础知识的 Pluralsight 课程,当我将我的应用程序部署到 HoloLens 模拟器时,我一直遇到这个问题。
无论我是在没有调试的情况下运行还是在调试的情况下运行并且不设置任何断点,我看到开始菜单都很好,然后它会清除,并且在应该显示 Unity 启动屏幕的位置,我只是得到一个小的白色光标屏幕中间,没有其他任何事情发生。
但是,如果我在 app.cs 构造函数中设置断点,然后单步执行代码,我可以看到启动屏幕出现,并且一旦我单步执行 Main 方法和 CoreApplication.Run(App) 方法调用,应用程序就会运行。
查看 ouotput 日志时,当程序挂起时,它会停在下图所示的点。
Direct3D:
Version: Direct3D 11.0 [level 11.1]
Renderer: Microsoft RemoteFX Graphics Device - WDDM (ID=0x2c1)
Vendor: Microsoft
VRAM: 639 MB
Initialize engine version: 5.6.3f1 (d3101c3b8468)
'Example1.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\Example1VS.Debug_x86.xxxx\UnityEngineProxy.dll'. Cannot find or open the PDB file.
'Example1.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\Example1VS.Debug_x86.xxxx\System.Linq.dll'. Cannot find or open the PDB file.
'Example1.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\Example1VS.Debug_x86.xxxx\System.Reflection.Extensions.dll'. Module was built without symbols.
The following GlobalManagers were stripped from the build (Either because they're not used or not supported on this platform):
NetworkManager
MasterServerInterface
UnityAdsManager
ClusterInputManager
CrashReportManager
If your machine has multiple graphics adapters, Unity may have created a WindowContext on the wrong adapter. If you experience a black screen when playing, please restart the Editor.
(Filename: C:/buildslave/unity/build/Runtime/VR/VRDevice.cpp Line: 194)
但是,当程序由于我设置断点并单步执行代码而正确运行时,以下行会出现在上面列出的输出之后,在输出窗口中
UnloadTime: 36.962299 ms
Setting up 1 worker threads for Enlighten.
Thread -> id: 8d0 -> priority: 1
The program '[1480] Example1.exe' has exited with code -1 (0xffffffff).
我的开发笔记本电脑有两个适配器;
AMD Radeon HD 8790M
Intel HD Graphics 4600
我在 redditt r/HoloLens 上找到了一篇文章,其中谈到了“进入播放器设置 -> 其他设置 -> 颜色空间并将其交换为 Gamma 而不是线性”,但我的设置已经在 Gamma 上,所以这似乎不适用.
有任何想法吗?