gree / unity-webview

zlib License
2.19k stars 680 forks source link

AdMob Banner hides behind the app #1071

Open saqibhayatmalik opened 1 month ago

saqibhayatmalik commented 1 month ago

Using unity-webview to play youtube videos in my app. AdMob banner ads are recording impressions but not visible. But i can click on the banner and the banner gets clicked. I have done everything to resolve the issue but in the end, removing this unity-webview plugin seems to work.

Help us in resolving this issue.

KojiNakamaru commented 1 month ago

I'll investigate the issue if you provide a minimum unity project that reproduces it.

saqibhayatmalik commented 1 month ago

WebView AdMob.zip

I have attached a minimal project and an apk. Banner is loaded in the bottom and it isn't visible. But i can click it which takes me out of the app.

Platform: Android

KojiNakamaru commented 1 month ago

You seem to utilize a bit old "render over native ui" variant found at https://github.com/gree/unity-webview/pull/584 and set "Render Over Native UI" in Settings. Native UIs (including webviews shown by unity-webivew and those shown by AdMob) are thus placed behind unity's rendering view so that you have to make the Unity's rendering view transparent, i.e., set Camera's background alpha to zero.

Also, it is better to use the latest "render over native ui" variant because the background of the whole app becomes transparent for the version you currently utilize.

I attached your app with my tweaks below, Please refer git logs for details.

WebView.AdMob-tweaked.zip