Question > error:EasyAR is running on an unsupported graphics device of type -4.

error:EasyAR is running on an unsupported graphics device of type -4.

Black screen appears when combining XCode exported from Unity with the native project, but 3D models are displayed when something is scanned.

error:EasyAR is running on an unsupported graphics device of type -4.

Sense
2020-03-24

Usually this is not a bug in EasyAR or Unity, but a problem with the way the XCode project is combined.

In order to display correctly, you first need to ensure that the Graphics Device is set to GLES2 as described in the documentation.

Then you need to make sure that UnityRegisterRenderingPlugin(&ezarUnitySetGraphicsDevice, &ezarUnityRenderEvent); is called normally (just look at the code next to this code to see if it is called). If it is not called, it is definitely not normal. This code is in EasyARAppController.shouldAttachRenderDelegate if the file is not changed.

If you are not called, please find the reason yourself. There are many possibilities. The most common one is similar to the previous one (although the problem itself is not the same, the reason behind it is the same), that is, using IMPL_APP_CONTROLLER_SUBCLASS to register more, so Some (such as EasyAR) will not work. At this time, if there are multiple IMPL_APP_CONTROLLER_SUBCLASS or similar things, they need to be merged together. But other situations need to be based on the specific code to know where the problem is.

In addition, any Unity plugin that uses the native render plugin will have similar problems, so this should not be a new problem, but the plugin that uses the unity native render plugin is less likely to be encountered.