jiulongw / swift-unity

Sample code that integrate Unity (2017.1+) scene into iOS (Swift 4.0, Xcode 9+) project.
390 stars 100 forks source link

Vuforia (Unity created Xcode project) shows blank screen after adding to existing Xcode app #105

Open LiborZa opened 6 years ago

LiborZa commented 6 years ago

Hi,

I added Xcode Unity AR (with Vuforia) project to existing Xcode app by this project. I have few problems but I solved them all and my project is now building and running in real device. App works as before but when I try to select AR item from menu so my controller with Unity AR is pushed. I get blank screen (white screen). These are few lines from console log (that I think are related to problem):

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

More info about versions:

I tried to change many settings according to many forum posts that I found but nothing helps me. I am not using Metal (I am using OpenGLES3, I tried OpenGLES2 too).

Thanks for help

lorant-csonka-ICE commented 4 years ago

I have the same issue

lorant-csonka-ICE commented 4 years ago

Mine was actually resolved. It's working if I set up this order at graphic frameworks:

  1. OpenGLES3
  2. OpenGLES2
  3. Metal