全息模拟器在 Unity 启动画面之前挂起
Holographic Emulator hangs before Unity splash screen
我正在 运行ning 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 后看到启动画面和应用程序 运行s方法和 CoreApplication.Run(App) 方法调用。
查看输出日志时,当程序挂起时,它会停在如下所示的位置。
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)
然而,当程序 运行 由于我设置断点并单步执行代码而正确时,以下行出现在上面列出的输出之后,在输出 window
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 上发现了一个 post 谈到 "Go into player settings -> other settings -> Color Space and swap it to Gamma rather than Linear",但我的设置已经在 Gamma 上,所以这似乎不适用。
有什么想法吗?
我猜是因为模拟器(使用 hyper v directx 加速)渲染到错误的适配器。听起来这与时间有关。配备双显卡设置的笔记本电脑大部分时间使用较低功率的 Intel 适配器,但在渲染 3d 内容时切换到 nvidia 卡。我猜 unity and/or hyperv 会在切换发生之前选择适配器。
要尝试的事情:
- 您应该能够在某个地方的驱动程序中始终强制使用一个适配器。看看这是否使它起作用,如果起作用,您就知道这是问题所在。
- 尝试将两个适配器的驱动程序更新到最新版本。
- 尝试更新到最新的工具链(vs2017/unity2017)
我正在 运行ning 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 后看到启动画面和应用程序 运行s方法和 CoreApplication.Run(App) 方法调用。
查看输出日志时,当程序挂起时,它会停在如下所示的位置。
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)
然而,当程序 运行 由于我设置断点并单步执行代码而正确时,以下行出现在上面列出的输出之后,在输出 window
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 上发现了一个 post 谈到 "Go into player settings -> other settings -> Color Space and swap it to Gamma rather than Linear",但我的设置已经在 Gamma 上,所以这似乎不适用。
有什么想法吗?
我猜是因为模拟器(使用 hyper v directx 加速)渲染到错误的适配器。听起来这与时间有关。配备双显卡设置的笔记本电脑大部分时间使用较低功率的 Intel 适配器,但在渲染 3d 内容时切换到 nvidia 卡。我猜 unity and/or hyperv 会在切换发生之前选择适配器。
要尝试的事情:
- 您应该能够在某个地方的驱动程序中始终强制使用一个适配器。看看这是否使它起作用,如果起作用,您就知道这是问题所在。
- 尝试将两个适配器的驱动程序更新到最新版本。
- 尝试更新到最新的工具链(vs2017/unity2017)