Displaying android SurfaceView over Unity scene on Android
I have a Unity project(Unity version 2018.4.6f1) and advertising module as an android plugin. To display ads I use container (FrameLayout) and attach this container to UnityPlayerActivity. Everything is fine when I deal with banner views of variety of ad networks.
But when I try to display Native ads from admob there is an issue with com.google.android.gms.ads.formats.MediaView it is transparent ad even makes container transparent. I suppose that under the hood MediaView uses SurfaceView and tried to display SurfaceView over Unity scene and it is also not displayed.
As far as I can see with LayoutInspector, UnityPlayer holds a SurfaceView and I guess it uses SurfaceView to render Unity scene there. So I tried to draw admob native ads over SurfaceView without Unity and it works fine.
Maybe someone knows why this can happen and if it is possible to do something?
Your answer
Follow this Question
Related Questions
shader does not work properly on android 0 Answers
Remove Handheld.PlayFullScreenMovie by tapped on custom Button 0 Answers
Using React-Native and Unity3D in the Same View 2 Answers
Prepare Unity without showing UnityPlayer 0 Answers
Playing as in real world 0 Answers