Unity native ads not working

146 views
Skip to first unread message

Andres Mejia

unread,
Oct 3, 2022, 9:57:48 AM10/3/22
to Google Mobile Ads SDK Developers
Im trying to implement the Native ads for unity, but its not working. I have managed to implement the banner and Interstitial ads and they work as expected, but the native ads don't load or fail.

public void Start()
    {
        // Initialize the Google Mobile Ads SDK.
        MobileAds.Initialize(initStatus => { });
        RequestNativeAd();
    }

private void RequestNativeAd()
    {

        string adUnitId = "ca-app-pub-3940256099942544/2247696110";
        AdLoader adLoader = new AdLoader.Builder(adUnitId)
            .ForNativeAd()
            .Build();
        adLoader.OnNativeAdLoaded += this.HandleNativeAdLoaded;
        adLoader.OnAdFailedToLoad += this.HandleAdFailedToLoad;
        adLoader.LoadAd(new AdRequest.Builder().Build());
       
    }

    private void HandleAdFailedToLoad(object sender, AdFailedToLoadEventArgs e)
    {
    }

    private void HandleNativeAdLoaded(object sender, NativeAdEventArgs e)
    {
    }

Mobile Ads SDK Forum Advisor

unread,
Oct 3, 2022, 3:31:16 PM10/3/22
to afm...@gmail.com, google-adm...@googlegroups.com
Hi Andres,

Thank you for reaching out to us. Let me do the best I can to assist you in this.

Looking at your code snippet, I could confirm that you ad request is fine. I went ahead to check if there's an issue with our demo unit through our sample app. As per checking, I was able to load an ad on my end. With that, we would suggest to check our sample app as well on your end and recommends to check its implementation, then use it as your reference to implement it into your app.

Regards,
Google Logo
Teejay Wennie
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2ewa58:ref
Reply all
Reply to author
Forward
0 new messages