简体   繁体   English

全息仿真器在Unity启动屏幕之前挂起

[英]Holographic Emulator hangs before Unity splash screen

I am running Visual Studio 2015 update 3, Unity 5.6.3f1, Holographic Emulator 10.0.14393.1358 and Windows 10 SDK 10.0.14393.798. 我正在运行Visual Studio 2015更新3,Unity 5.6.3f1,全息仿真器10.0.14393.1358和Windows 10 SDK 10.0.14393.798。 I am just working through a Pluralsight course for HoloLens Development Fundamentals and I keep running into this issue when I deploy my app to the HoloLens emulator. 我只是在为HoloLens开发基础课程学习Pluralsight课程,并且在将应用程序部署到HoloLens模拟器时一直遇到这个问题。

Whether I run without debugging or run with debugging and do not set any breakpoints, I see the start menu bloom just fine and then it clears and at the point where the Unity splash screen is supposed to display, I just get the small white cursor in the middle of the screen and nothing else ever happens. 无论我是在没有调试的情况下运行还是在没有调试的情况下运行,并且没有设置任何断点,我都可以看到开始菜单绽放得很好,然后将其清除,并在应该显示Unity启动画面的位置上,我得到了一个小的白色光标屏幕中间没有其他任何事情发生。

However, If I set a breakpoint in the app.cs constructor and then step through the code, I can then see the splash screen appear and the app runs once I step through the Main method and the CoreApplication.Run(App) method call. 但是,如果我在app.cs构造函数中设置了一个断点,然后逐步执行代码,则可以看到启动屏幕,并且一旦我逐步执行Main方法和CoreApplication.Run(App)方法调用,应用程序便会运行。

When looking at the ouotput log, when the program hangs, it stops at the point shown below. 当查看输出日志时,当程序挂起时,它将在以下所示的位置停止。

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)

however, when the program runs correctly as a result of me setting a breakpoint and stepping through the code, the following lines appear after the output listed above, in the output 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).

My dev laptop has two adapters; 我的开发笔记本电脑有两个适配器。

AMD Radeon HD 8790M
Intel HD Graphics 4600

I found a post on redditt r/HoloLens that talked about "Go into player settings -> other settings -> Color Space and swap it to Gamma rather than Linear", but my setting is already on Gamma so that doesn't seem to apply. 我在redditt r / HoloLens上找到了一篇帖子,内容是“进入播放器设置->其他设置->颜色空间并将其交换为Gamma而不是线性”,但我的设置已经在Gamma上,因此似乎不适用。

Any ideas? 有任何想法吗?

I would guess what is happening is that the emulator (which uses the hyper v directx acceleration) is rendering to the wrong adapter. 我猜这是怎么回事,模拟器(使用hyper v DirectX加速)正在渲染到错误的适配器。 It sounds like this is timing related. 听起来这与计时有关。 Laptops with the dual video card setup use the lower power Intel adapter most of the time but switch to the nvidia card when they are rendering 3d content. 具有双视频卡设置的笔记本电脑大多数时候都使用低功耗的英特尔适配器,但是在渲染3d内容时切换到nvidia卡。 I'm guessing that unity and/or hyperv is picking the adapter before that switch takes place. 我猜测unity和/或hyperv在切换发生之前正在选择适配器。

Things to try: 尝试的事情:

  • You should be able to force one adapter's use all of the time in your drivers somewhere. 您应该能够始终在某个地方的驱动程序中强制使用一个适配器。 See if that makes it work, if it does you know that is the problem. 看看这是否可以解决问题,如果您知道那是问题所在。
  • Try updating your drivers for both adapters to the latest version. 尝试将两个适配器的驱动程序更新为最新版本。
  • Try updating to the newest tool chain (vs2017/unity2017) 尝试更新到最新的工具链(vs2017 / unity2017)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM