2017-08-28 55 views
0

我正在运行Visual Studio 2015更新3,Unity 5.6.3f1,全息仿真器10.0.14393.1358和Windows 10 SDK 10.0.14393.798。我只是通过HoloLens开发基础知识的Pluralsight课程,当我将应用程序部署到HoloLens模拟器时,我一直在遇到这个问题。全息仿真器在Unity启动屏幕前挂起

无论我是否在没有调试的情况下运行,或者在调试时运行并且没有设置任何断点,我都会看到开始菜单开局很好,然后清空,并且在Unity启动屏幕应该显示的位置,屏幕中间有一个小白色的光标,没有其他事情发生。但是,如果我在app.cs构造函数中设置了断点,然后遍历代码,则可以看到启动屏幕出现,并且一旦我执行Main方法和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) 

但是,程序运行正常为我设置一个断点,单步调试代码的结果时,下面的线出现上面列出的输出后,在输出窗口

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). 

我dev笔记本电脑有两个适配器;

AMD Radeon HD 8790M 
Intel HD Graphics 4600 

我发现redditt R/HoloLens一个贴子,讲到“走进播放器设置 - >其他设置 - >颜色空间,它交换到伽玛而不是线性的”,但我的设置已经是对伽玛所以这似乎并不适用。

任何想法?

回答

1

我猜想发生了什么事情是模拟器(使用hyper v directx加速)渲染到错误的适配器。这听起来像是与时间有关。双显卡设置的笔记本电脑大多数时间使用功率较低的英特尔适配器,但在渲染3D内容时切换到nvidia显卡。我猜测unity和/或hyperv在转换发生之前就选择了适配器。

事情尝试:

  • 你应该能够迫使地方一个适配器的使用所有的时间在你的驱动程序。看看它是否有效,如果它确实是你的问题。
  • 尝试更新两个适配器的驱动程序到最新版本。
  • 尝试升级到最新的工具链(vs2017/unity2017)
+0

看来,适配器是问题。我在设备管理器中禁用了AMD显示适配器,现在HoloLens仿真器似乎工作正常。 – EiEiGuy

+0

作为一方,我已经更新了驱动程序,这没有什么区别。我还开始使用VS2017和Unity 2017.1.0f3以及Unity 2017.2.0b7,但他们没有什么区别。 – EiEiGuy