Vuforia(Unity创建Xcode项目)在添加到现有Xcode应用程序后显示空白屏幕

问题描述 投票:3回答:2

我将qcode Unity AR(与Vuforia)项目添加到this tutorial的现有Xcode应用程序中。我几乎没有问题,但我解决了所有这些问题,我的项目现在正在实际设备中构建和运行。应用程序像以前一样工作但当我尝试从菜单中选择AR项目时,我的控制器与Unity AR被推送。我得到空白屏幕(白色屏幕)。这些是来自控制台日志的几行(我认为与问题有关):

User pre-granted access to the camera
[6669:1320892] INFO/AR(6669) 2018-09-27 10:08:15: Vuforia selected rendering API OpenGL ES 2.x
[6669:1320892] INFO/AR(6669) 2018-09-27 10:08:15: Vuforia SDK version 7.2.23
[6669:1320892] INFO/AR(6669) 2018-09-27 10:08:15: Vuforia Fusion: Detected and enabled use of ARKit
[6669:1320892] Rendering mode set to: OpenGL ES 2.0
[6669:1320892] Rendering mode set to: OpenGL ES 2.0
[6669:1320892] DEBUG/AR(6669) Could not find a UIView with CAEAGLLayer or CAMetalLayer layer class that responds to selector renderFrameVuforia
[6669:1320892] DEBUG/AR(6669) UIView has CAEAGLLayer layer class
[6669:1320892] DEBUG/AR(6669) UIView does not respond to selector renderFrameVuforia
[6669:1320892] DEBUG/AR(6669) UIView has CAEAGLLayer layer class
[6669:1320892] DEBUG/AR(6669) UIView does not respond to selector renderFrameVuforia
[6669:1320892] DEBUG/AR(6669) Could not find a UIView with CAEAGLLayer or CAMetalLayer layer class that responds to selector renderFrameVuforia
Vuforia initialization successful
...
[6669:1320892] ERROR/AR(6669) 2018-09-27 10:08:16: Cannot setMode to AR before Camera is initialized
Dataset ARBoxes could not be loaded and cannot be activated.
...
cameraDeviceStartCamera
[6669:1320892] INFO/AR(6669) 2018-09-27 10:08:16: Starting camera with profile for iPhone10,4, 720.1
[6669:1320892] ERROR/AR(6669) 2018-09-27 10:08:16: VideoBackgroundConfig with screen size of zero received, skipping config step

有关版本的更多信息:

  • Xcode 10
  • iPhone 8(iOS 12)
  • Unity 2018.2.9
  • Vuforia 7.2.23

我尝试根据我发现的许多论坛帖子更改了许多设置,但没有任何帮助我。我没有使用Metal(我正在使用OpenGLES3,我也尝试过OpenGLES2)。

感谢帮助

unity3d augmented-reality arkit vuforia xcode10
2个回答
0
投票

ARKit是一个最新的框架,它被设计为广泛使用Metal / SceneKit渲染,而不是OpenGL ES。混合ARSCNViewOpenGL ES 2.x渲染似乎非常非常糟糕的主意。

切换到金属。

此外,将Vuforia Engine更新为新的7.5版本。必须解决黑屏问题。并使用Xcode 10(10A255)的官方版本,而不是beta版。

附:你用的是什么iPhone?你写的是你使用的iPhone 8,但控制台说:Starting camera with profile for iPhone10,4, 720.1


0
投票

问题是Unity中的图形API。 Metal在最新的Xcode版本中不受支持,并将Metal替换为OpenGLES2或OpenGLES3。

© www.soinside.com 2019 - 2024. All rights reserved.