I’d like to have Unity render to a surface with transparency on Android, for use as an overlay view within a native application. This was apparently possible in earlier versions of Unity, where it was possible to adjust the parameters of the created GLSurfaceView before surface creation. Currently it appears that Unity creates an opaque EGL surface in one of the shared libraries (libmain, libmono, or libunity)
There are potential solutions which would require assistance from Unity (listed below). Anyone been able to work around this restriction on Android?
I’ve submitted a “new idea” form for this, which allows users to vote for features. https://feedback.unity3d.com/suggestions/transparency-on-android-to-allow-unity-to-be-used-as-an-overlay-on-native-application
Here are the Unity assisted solutions I mentioned:
- Provide a build option to enable a transparent surface
- Provide custom libraries that would use a transparent surface
- Provide source code and build instructions for the libraries so that I may make the required changes
- Build an option in the java UnityPlayer class to allow for a transparent surface