【发布时间】:2019-03-01 23:00:23
【问题描述】:
我通过this tutorial 将 Xcode Unity AR(带有 Vuforia)项目添加到现有 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)
- 团结 2018.2.9
- Vuforia 7.2.23
我尝试根据我发现的许多论坛帖子更改许多设置,但没有任何帮助。我没有使用 Metal(我使用的是 OpenGLES3,我也尝试过 OpenGLES2)。
感谢您的帮助
【问题讨论】:
-
当您使用 Unity 显示控制器时,您的 Unity 场景是否显示?可能您的问题不在于 Vuforia,而在于将 Unity 集成到本机应用程序中?您可以在 Unity 中添加简单场景并检查您的交互是否有效(您的简单场景是否可以在本机应用程序中显示)
标签: unity3d augmented-reality arkit vuforia xcode10