Beispiel #1
0
 void OnDisable()
 {
     if (!isDontDestroy)
     {
         IMobileNativeAdRecieverManager.RemoveRecieverFromDictionary(adViewId);
     }
     if (hasReceivedNativeAd)
     {
                     #if UNITY_IPHONE && !UNITY_EDITOR
         if (Application.platform == RuntimePlatform.IPhonePlayer)
         {
             IMobileSdkAdsUnityPlugin.destroyNativeAd(adViewId);
         }
                     #elif UNITY_ANDROID && !UNITY_EDITOR
         if (Application.platform == RuntimePlatform.Android)
         {
             IMobileSdkAdsUnityPlugin.getAndroidClass().CallStatic("destroyNativeAd", this.gameObject.name);
         }
                     #endif
     }
 }