Native Ads Unity not clickable

8 views
Skip to first unread message

Alan Wong

unread,
1:49 PM (9 hours ago) 1:49 PM
to Google Mobile Ads SDK Developers
I am trying to implement native ads into my Unity game.  The ads icon is blurred at the beginning and I did some tricks to make it work.  However, I found that the ads is not clickable.  I tried many different ways but still had no luck.  Please help.

I am sure that the box colliders are big enough to click.  Also, I placed the objects inside a canvas with a render mode "Screen Space - Camera" and assigned the main camera to it.  I also disabled the raycast of all the objects to ensure they would not block the clicks.  Please let me know what else I may missed in the setup.

Below is the code I use for setting up the ads.

//Setup Icons - with a fix of blurry icons by creating mipmap for them
var adsIconTexture = loadingScreenAds.nativeAd.GetIconTexture();
                            var mipTexture = new Texture2D(adsIconTexture.width, adsIconTexture.height, TextureFormat.RGB24, false);
                            mipTexture.SetPixels(adsIconTexture.GetPixels());
                            mipTexture.filterMode = FilterMode.Trilinear;
                            mipTexture.Apply();
                            AdsImage.texture = mipTexture;

                            var adsChioceTexture =  loadingScreenAds .nativeAd.GetAdChoicesLogoTexture();
                            var mipTexture2 = new Texture2D(adsChioceTexture.width, adsChioceTexture.height, TextureFormat.RGBA32, false);
                            mipTexture2.SetPixels(adsChioceTexture.GetPixels());
                            mipTexture2.filterMode = FilterMode.Trilinear;
                            mipTexture2.Apply();
                            AdsChioce.texture = mipTexture2;
//Setup Text
AdsTitle.text =  loadingScreenAds.nativeAd.GetHeadlineText();
AdsButtonText.text =  loadingScreenAds.nativeAd.GetCallToActionText();
AdsDescription.text =  loadingScreenAds.nativeAd.GetBodyText();

//Register objects
loadingScreenAds.nativeAd.RegisterIconImageGameObject(AdsImage.gameObject);
loadingScreenAds.nativeAd.RegisterHeadlineTextGameObject(AdsTitle.gameObject);
loadingScreenAds.nativeAd.RegisterCallToActionGameObject(AdsButtonText.gameObject);
loadingScreenAds.nativeAd.RegisterBodyTextGameObject(AdsDescription.gameObject);
loadingScreenAds.nativeAd.RegisterAdChoicesLogoGameObject(AdsChioce.gameObject);

Thank you.Colliders.png
Reply all
Reply to author
Forward
0 new messages