示例#1
0
        public static void Init()
        {
            adsDB = AdsDB.LoadDB();

            window = (AdsEditor)EditorWindow.GetWindow(typeof(AdsEditor), false, "Ads Editor");
            window.Show();
        }
示例#2
0
        void Awake()
        {
            instance = this;
            AdsDB adsDB = AdsDB.LoadDB();

            admobUIDAndroid = adsDB.admobUIDAndroid;
            admobUIDIOS     = adsDB.admobUIDIOS;
#if GOOGLE_MOBILE_ADS
#if UNITY_IOS
            interstitial = new InterstitialAd(admobUIDIOS);
#else
            interstitial = new InterstitialAd(admobUIDAndroid);
#endif

            requestAdmob = new AdRequest.Builder().Build();
            interstitial.LoadAd(requestAdmob);
            interstitial.OnAdLoaded       += HandleInterstitialLoaded;
            interstitial.OnAdFailedToLoad += HandleInterstitialFailedToLoad;
#endif
        }