Unity Admob Native in UI requires Screen Space - Camera Rendering

527 views
Skip to first unread message

Alex Ferrier

unread,
Sep 26, 2018, 7:14:22 PM9/26/18
to Google Mobile Ads SDK Developers
We're integrating native ads into the UI of our Unity-based app. 

We have them working fine in a testbed, but due to the way click hitbox detection (and presumably also impression detection?) works, in order to use UI elements with BoxCollider2D attached, you must switch your UI Canvas to Screen Space (Camera) rendering. Screen Space (overlay) will not work, especially with e.g. ads embedded in a ScrollView.  (Presumably the ad code is internally raycasting on clicks from known camera positions.) 

Just wanted to confirm that this is as designed, as our UI is currently Screen Space-camera, and there are a few complexities with interaction between the UI and 3D scene to fix up in order for us  to switch. The current docs are only refer to 3D-world MeshRenderers and TextMeshes. 

Unity 2017.4.11f1
GoogleMobileAds-3.15.0.1.unitypackage

mobileadssdk-a...@google.com

unread,
Sep 27, 2018, 7:30:11 PM9/27/18
to Alex Ferrier, Google Mobile Ads SDK Developers
Hey Alex,

The 3.15.0.1 release included changes to support overlay canvases. Clicks not being detected is not expected behavior. Would you be able to share a test app that reproduces ad clicks not working as expected? It would help us investigate and implement a fix. 

- Ram


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/ab7f7cd2-9d8f-407b-ab51-9aa4ae992e3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex Ferrier

unread,
Sep 28, 2018, 6:22:54 PM9/28/18
to mobileadssdk-a...@google.com, google-adm...@googlegroups.com
Yep, that doesn't seem to be working. Tested on iPad Air 2, iOS 11.4.1 unity and Ad SDK versions as above. Minimal project will follow by private reply. Project works fine in screen space camera, but not overlay. 

I haven't checked on Android, but if it's not working on both target platforms we'd have to move to screen space camera anyway...

A.

On Thu, 27 Sep 2018 at 16:30, <mobileadssdk-a...@google.com> wrote:
Hey Alex,

The 3.15.0.1 release included changes to support overlay canvases. Clicks not being detected is not expected behavior. Would you be able to share a test app that reproduces ad clicks not working as expected? It would help us investigate and implement a fix. 

- Ram


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 09/26/18 16:14:22 al...@nanuinteractive.com wrote:
We're integrating native ads into the UI of our Unity-based app. 

We have them working fine in a testbed, but due to the way click hitbox detection (and presumably also impression detection?) works, in order to use UI elements with BoxCollider2D attached, you must switch your UI Canvas to Screen Space (Camera) rendering. Screen Space (overlay) will not work, especially with e.g. ads embedded in a ScrollView.  (Presumably the ad code is internally raycasting on clicks from known camera positions.) 

Just wanted to confirm that this is as designed, as our UI is currently Screen Space-camera, and there are a few complexities with interaction between the UI and 3D scene to fix up in order for us  to switch. The current docs are only refer to 3D-world MeshRenderers and TextMeshes. 

Unity 2017.4.11f1
GoogleMobileAds-3.15.0.1.unitypackage

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
To post to this group, send email to google-adm...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages