![]() |
Mobile Ads SDK Team |
Unlike banner ads, AdMob Native Ads do not refresh automatically, and you need to implement your own refresh logic. Google recommends not refreshing native ads too frequently, as it can impact user experience and ad performance. However, if you want to refresh them periodically, here’s the best approach:
Steps to Implement Native Ad Refresh in Unity: 1. Load and Display the Native AdMake sure you're loading and displaying the ad correctly using AdLoader.
void RequestNativeAd() { AdLoader adLoader = new AdLoader.Builder(adUnitId) .ForUnifiedNativeAd() .Build(); adLoader.OnUnifiedNativeAdLoaded += HandleOnUnifiedNativeAdLoaded; adLoader.LoadAd(new AdRequest.Builder().Build()); } void HandleOnUnifiedNativeAdLoaded(object sender, UnifiedNativeAdEventArgs args) { nativeAd = args.nativeAd; // Display the ad in your UI } 2. Implement a Timer for RefreshUse InvokeRepeating() or Coroutine in Unity to refresh the ad at a set interval (e.g., every 60 seconds).
void Start() { RequestNativeAd(); InvokeRepeating(nameof(RefreshNativeAd), 60f, 60f); // Refresh every 60 seconds } void RefreshNativeAd() { if (nativeAd != null) { nativeAd.Destroy(); // Destroy the current ad to prevent memory leaks } RequestNativeAd(); // Load a new ad } 3. Follow Google’s Best Practices for RefreshingThis approach ensures your Native Ads refresh efficiently without violating Google’s policies or degrading performance.
Let me know if you need further clarification!