【问题标题】:Holographic Emulator hangs before Unity splash screen全息模拟器在 Unity 启动画面之前挂起
【发布时间】:2019-02-25 16:35:50
【问题描述】:

我正在运行 Visual Studio 2015 更新 3、Unity 5.6.3f1、Holographic Emulator 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 上,所以不会似乎适用。

有什么想法吗?

【问题讨论】:

    标签: c# unity3d visual-studio-2015 unity5 hololens-emulator


    【解决方案1】:

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

    要尝试的事情:

    • 您应该能够在某个地方的驱动程序中始终强制使用一个适配器。看看这是否使它工作,如果它知道那是问题所在。
    • 尝试将两个适配器的驱动程序更新到最新版本。
    • 尝试更新到最新的工具链(vs2017/unity2017)

    【讨论】:

    • 看来适配器是问题所在。我在设备管理器中禁用了 AMD 显示适配器,现在 HoloLens Emulator 似乎工作可靠。
    • 另一方面,我已经更新了驱动程序,但这并没有什么不同。我也开始使用 VS2017 和 Unity 2017.1.0f3 以及 Unity 2017.2.0b7,但它们并没有什么不同。
    猜你喜欢
    • 2011-07-23
    • 1970-01-01
    • 2017-12-17
    • 2011-05-24
    • 2012-11-07
    • 2011-03-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多