"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Vuforia always set to OpenGL ES 2.0

Greetings,

 

I am trying to implement Unity into React Native using a plugin from the following link https://github.com/f111fei/react-native-unity-view.

I successfully put Vuforia to be compiled alongside the app, but whenever I tried to compile the application Vuforia always set the rendering to OpenGL ES 2.0. Here's some log I gathered after I run the app:

Initializing Vuforia... 2019-08-06 14:42:47.621329+0700 unityreact4[1053:77026] User pre-granted access to the camera 2019-08-06 14:42:47.621433+0700 unityreact4[1053:77026] INFO/AR(1053) 2019-08-06 14:42:47: Vuforia selected rendering API OpenGL ES 2.x 2019-08-06 14:42:47.621476+0700 unityreact4[1053:77026] INFO/AR(1053) 2019-08-06 14:42:47: Vuforia SDK version 8.3.8 2019-08-06 14:42:47.621504+0700 unityreact4[1053:77026] INFO/AR(1053) 2019-08-06 14:42:47: Vuforia SDK build 3621 2019-08-06 14:42:47.690246+0700 unityreact4[1053:77026] INFO/AR(1053) 2019-08-06 14:42:47: Matched precache profile for Apple, iPad7,5, iOS 12, 800.1 2019-08-06 14:42:48.997315+0700 unityreact4[1053:77026] INFO/AR(1053) 2019-08-06 14:42:48: Vuforia Fusion: Detected and enabled use of ARKit 2019-08-06 14:42:48.999518+0700 unityreact4[1053:77026] Rendering mode set to: OpenGL ES 2.0 2019-08-06 14:42:49.036414+0700 unityreact4[1053:77026] Rendering mode set to: OpenGL ES 2.0 2019-08-06 14:42:49.037062+0700 unityreact4[1053:77026] DEBUG/AR(1053) UIView has CAMetalLayer layer class 2019-08-06 14:42:49.037287+0700 unityreact4[1053:77026] DEBUG/AR(1053) UIView does not respond to selector renderFrameVuforia

It's really weird because I really need the app to run with Metal and I already forced the Unity Graphics API's into Metal.

Image removed.

 

I tried to run the app without using react-native way and the output was correct! It's using Metal for its rendering API. Here's some log from it:

Initializing Vuforia...

2019-08-06 13:44:58.044546+0700 unityreact4[975:63447] User pre-granted access to the camera

2019-08-06 13:44:58.044615+0700 unityreact4[975:63447] INFO/AR(975) 2019-08-06 13:44:58: Vuforia selected rendering API Metal

2019-08-06 13:44:58.044632+0700 unityreact4[975:63447] INFO/AR(975) 2019-08-06 13:44:58: Vuforia SDK version 8.3.8

2019-08-06 13:44:58.044646+0700 unityreact4[975:63447] INFO/AR(975) 2019-08-06 13:44:58: Vuforia SDK build 3621

2019-08-06 13:44:58.097371+0700 unityreact4[975:63447] INFO/AR(975) 2019-08-06 13:44:58: Matched precache profile for Apple, iPad7,5, iOS 12, 800.1

2019-08-06 13:44:59.658717+0700 unityreact4[975:63447] INFO/AR(975) 2019-08-06 13:44:59: Vuforia Fusion: Detected and enabled use of ARKit

 

My question is how does Vuforia detect the rendering API to be used at the initialization of the app? Maybe I could configure some specific file or settings on XCode to be read later by Vuforia framework and initialize its rendering API into Metal

 

Thanks

(Update)

I was reading how VuforiaUnityPlayer.h works, and looks like there's a method called initQCARiOS. I tried to find all of the scripts containg 'initQCARiOS' and suspect there's a part called Vuforia.UnityExtensions1.cpp which had this line:

 

Hey guys,

Did you found any solution ?

I am also facing the same issue when merging unity app with Native app.