OpenGL Native Plug-In Error with Unity on Android - unity3d

I am on a Unity 5.6.5f1 project targeting Android 6.0. The project is VR enabled with Daydream without the gvr sdk since I do not need any interaction.
I noticed that most of the time, when I launch the application, I get the stereo view but everything is black, I do not even see the splash screen and in logcat I get the following error:
'E/Unity: OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_FRAMEBUFFER_OPERATION: Framebuffer is not complete or incompatible with command'
However, 30% of the time, when I launch the application it works fine and I do not get this error.
So basically I open and close the app until it is working..
Any idea where it could come from? I am using multi pass rendering.

Related

build error UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors

The following error occurs when unity builds with Android phone.
enter image description here
The first time you don't set anything up, the build will succeed.
However, after downloading the ar foundation and arcore xr plugin package, the following error occurs.
What's the reason?
As the error at the top says, you have the Vulkan graphics API enabled and it’s not supported by ARCore. Go into Player Settings > Android and remove Vulkan from the list of graphics APIs. (If it’s not listed because Graphics API is set to Auto you’ll need to disable Auto I guess).

Cannot get simple beginners app to work on tablet using the latest version of Unity

I am new to unity 2021.2.10f and I have become stuck on getting a simple app working on a tablet /real hardware.
I am using unity 2021.2.10f my project is simply the built in
"3D Sample Scene(URP)" I did not change anything to it except added an icon to it (so I can see it in the tablet menu when it is installed on the android tablet)- the unity project can easily be
recreated-I could not upload it since it the project was large (more than 350MB) for my internet connection.
This is how the the unity project looks on my computer
enter image description here
When I compile this to an android apk I just get a pink/magenta screen (as shown below).
enter image description here
I also get the message below from the tablet.
enter image description here
After googling around for an answer I found out
this pink/magenta screen means it is a shader problem.After more googling for an answer it was recommended to tick or untick to reset the
~"Auto Graphic API" as a fix-but this did not work for me.
I also changed the color space from Gamma to linear-and again this did not work for me. My tablet is a Maitai MT107.
So my question is -how do I get this to work?
In previous years and using older versions of unity I have been able to get unity made apps to work perfectly on several different tablets (though not an MT-107).
Also the compiled version of this project does not
work in latest version of Bluestacks on Windows 10-it shows a blank black screen instead of a pink screen-may be it is related to that-
maybe if I can get it to work with the Bluestacks emulator it will work on real hardware-but I do not know what exactly the problem is that is stopping the app working on the MT107.
I figured it out using Shingo's comments.
My tablet only supports GL ES2 because
I ran CPU-Z to find that out.
I made a simple test program (just the default empty project with the blue sky) with
unity 2020 (NOT the latest version) when GL ES 2 is selected.
Here is the gotcha-it looks like ES2 was removed in the latest version
of Unity 2021.2.10f-but it can be selected in the following way.
I started off by making my test program in unity 2020 save and closed the project. I selected GLES 2, as shown below,in this older version of unity (NOT using "Auto Graphic API")
Then I re-opened it, this makes unity convert the project so it
works in the latest version of unity 2021.2.10f-then I can see the GLES 2 (depreciated) appears in the
latest version of Unity. The GLES2 option circled in blue shown below
-GLES 2 support does not appear in the project if the project is not converted from the older version of unity.
Now I can use the latest version of unity to use with a tablet that supports
only GLES 2 by adding to the empty test program to eventually write my complete program.
I am happy I can still use my tablet with unity because: it wasn't cheap to
buy and bought this year, if it works on this tablet it will work on a GLES3 tablet (because of backwards compatiability).

Vuforia AR Camera working from the second attempt on Android

I have an Android application which I created using Unity and C#, it also uses Vuforia. I have an AR Camera, which shows a black screen when I have just installed the application and gave camera permission to it, but when I close the app and start it again, everything works fine. I did a lot of searches, so what I found and tried- to Switch automatic graphics to OpenGls2, to set minimization to none, etc. Upgrading Vuforia version will not work for me. Also ARCamera works for phones supporting ARCore and does not work for phones not having ARCore. So I guess, the issue is within the architecture of the phone. Any ideas on how to make it work?
It must be related to camera API. I don't know how Vuforia is trying to initialize the camera. Seems like it tries to initialize it before successful permission result on old Android versions. You can delay Vuforia initialization to be after the permission check. There is an option to set Vuforia delayed initialization, but it would be better to make a preload scene where you do check all permissions and maybe other setup and then load the scene where Vuforia is used.
Update: Please try to update xr plugins for Unity (they are packages now), update Unity itself to the latest version. Do not use unity beta. Se if there are some recommendations from Vuforia of which unity version is the latest supported. Youc also try to create a new unity project from scratch and then import the latest vuforia, then try camera on android, then if all good, import all the resources for your app.

Streaming from Vimeo using Unity SDK works from editor, but won't load video in a build

I've downloaded the Unity Vimeo SDK and gotten a video to stream in the editor without a problem. But in a build (I've tried both Android and Windows) the video player screen remains grey and the video never loads. This happens even with the example scenes. Any suggestions?
Thanks for the feedback! Are you saving the scene and adding it to build settings before trying to build? would also recommend toggling Development Build and Script Debugging on so you can see console errors in Unity during runtime

Unity3d 5.6 VR Cardboard application incorrectly displays on device

I've just installed Unity3d 5.6 and build application for Android with native VR support for Cardboard SDK (checking box Virtual Reality Supported and selecting Cardboard as VR SDK). App responds to movements of device, however, picture is not correctly takes only part of screen, what can cause that issue?
Built for Android 5.0, run on Android 5.1 Sony Z2, device is configured for cardboard viewer with Google Cardboard application, other VR games take all screen at expected.
Added:
As per advice on Unity forum I enabled Multithreded rendering, however it resulted in almost good, still not properly centered image flicked momentarely, then blank (lenses viewes disappeared).
If you are manually setting the screen resolution by script (Screen.SetResolution) try commenting that out.
As written in Unity forum here:
https://forum.unity3d.com/threads/google-vr-sdk-1-10-unity-5-5-broken.445323/
for VR for cardboard development it' better for now to stick to using Unity 5.4.2 with Google VR SDK 10.3.