//bool isAdmobInited = false; void initAdmob() { string adUnitIdbaner; string adUnitIdfull; // isAdmobInited = true; #if UNITY_EDITOR adUnitIdbaner = "baner_Adr"; adUnitIdfull = "fullbaner_Adr"; #elif UNITY_ANDROID adUnitIdbaner = baner_Adr; adUnitIdfull = fullbaner_Adr; #elif UNITY_5 || UNITY_IOS || UNITY_IPHONE adUnitIdbaner = baner_IOS; adUnitIdfull = fullbaner_IOS; #else adUnitIdbaner = baner_Adr; adUnitIdfull = fullbaner_Adr; #endif // Create a 320x50 banner at the top of the screen. // bannerView = new BannerView(adUnitId, AdSize.SmartBanner, AdPosition.Top); // bannerView.LoadAd(createAdRequest()); ad = Admob.Instance(); ad.bannerEventHandler += onBannerEvent; ad.interstitialEventHandler += onInterstitialEvent; ad.rewardedVideoEventHandler += onRewardedVideoEvent; ad.nativeBannerEventHandler += onNativeBannerEvent; ad.initAdmob(adUnitIdbaner, adUnitIdfull); // ad.setTesting(true); Debug.Log("admob inited -------------"); }
/*******************admob ads *******************/ void initAdmob() { ad = Admob.Instance(); ad.bannerEventHandler += onBannerEvent; ad.interstitialEventHandler += onInterstitialEvent; ad.rewardedVideoEventHandler += onRewardedVideoEvent; ad.nativeBannerEventHandler += onNativeBannerEvent; //ad.setTesting(true); ad.initAdmob(admob_bannerID, admob_interstitialID_fy); //all id are admob test id,change those to your ad.loadInterstitial(); //ad.setTesting(true);//show test ad ad.setGender(AdmobGender.MALE); string[] keywords = { "game", "crash", "male game" }; // ad.setKeywords(keywords);//set keywords for ad Debug.Log("admob inited -------------"); // Admob.Instance().showBannerAbsolute(AdSize.Banner, 20, 300); //1111 if(PlayerPrefs.GetInt("noAds",0) != 1) // ad.showBannerRelative(new AdSize(220,50), AdPosition.TOP_CENTER,0); loadRewardAds(); }
void initAdmob() { #if UNITY_IOS appID = "ca-app-pub-3940256099942544~1458002511"; bannerID = "ca-app-pub-3940256099942544/2934735716"; interstitialID = "ca-app-pub-3940256099942544/4411468910"; videoID = "ca-app-pub-3940256099942544/1712485313"; nativeBannerID = "ca-app-pub-3940256099942544/3986624511"; #elif UNITY_ANDROID appID = "ca-app-pub-3940256099942544~3347511713"; bannerID = "ca-app-pub-3940256099942544/6300978111"; interstitialID = "ca-app-pub-3940256099942544/6300978111"; videoID = "ca-app-pub-3940256099942544/5224354917"; nativeBannerID = "ca-app-pub-3940256099942544/2247696110"; #endif ad = Admob.Instance(); ad.bannerEventHandler += onBannerEvent; ad.interstitialEventHandler += onInterstitialEvent; ad.rewardedVideoEventHandler += onRewardedVideoEvent; ad.nativeBannerEventHandler += onNativeBannerEvent; ad.initSDK(appID); //optional ad.initAdmob(bannerID, interstitialID); //all id are admob test id,change those to your //ad.setTesting(true);//show test ad //ad.setNonPersonalized(true);//if want load NonPersonalized only,set true // ad.setIsDesignedForFamilies(true);//if is Is Designed For Families set true // ad.setGender(AdmobGender.MALE); // string[] keywords = { "game","crash","male game"}; // ad.setKeywords(keywords);//set keywords for ad Debug.Log("admob inited -------------" + appID); }
void initAdmob() { ad = Admob.Instance(); ad.interstitialEventHandler += onInterstitialEvent; ad.bannerEventHandler += onBannerEvent; ad.initAdmob("ca-app-pub-7657412837781109/5184954636", "ca-app-pub-7657412837781109/4023916208"); }
public void onInitAdmob() { Debug.Log("Initing Admob"); Admob ad = Admob.Instance(); #if UNITY_EDITOR string adUnitId = "unused"; #elif UNITY_ANDROID ad.initAdmob("ca-app-pub-5498938664783906/8473715872", "ca-app-pub-5498938664783906/9950449079"); #elif (UNITY_5 && UNITY_IOS) || UNITY_IPHONE ad.initAdmob("ca-app-pub-5498938664783906/5015878679", "ca-app-pub-5498938664783906/7969345077"); #else string adUnitId = "unexpected_platform"; #endif ad.loadInterstitial(); }
public void ShowBanner() { ad.initAdmob("ca-app-pub-6319110362714674/8855868924", "ca-app-pub-6319110362714674~2847782205"); //ad.bannerEventHandler += onBannerEvent; //ad.rewardedVideoEventHandler += onRewardedVideoEvent; ad.setTesting(true); ad.setGender(AdmobGender.MALE); Admob.Instance().showBannerRelative(AdSize.SmartBanner, AdPosition.BOTTOM_CENTER, 0); }
void initAdmob() { ad = Admob.Instance(); ad.rewardedVideoEventHandler += onRewardedVideoEvent; ad.interstitialEventHandler += onInterstitialEvent; //ca-app-pub-5547105749855252~7626858520 ad.initAdmob("", "");//all id are admob test id,change those to your ad.setGender(AdmobGender.MALE); Debug.Log("admob inited -------------"); }
//bool isAdmobInited = false; void initAdmob() { // isAdmobInited = true; ad = Admob.Instance(); ad.bannerEventHandler += onBannerEvent; ad.interstitialEventHandler += onInterstitialEvent; ad.rewardedVideoEventHandler += onRewardedVideoEvent; ad.nativeBannerEventHandler += onNativeBannerEvent; ad.initAdmob("ca-app-pub-3940256099942544/2934735716", "ca-app-pub-3940256099942544/4411468910"); // ad.setTesting(true); Debug.Log("admob inited -------------"); }
void initAdmob() { ad = Admob.Instance(); ad.bannerEventHandler += onBannerEvent; ad.interstitialEventHandler += onInterstitialEvent; ad.rewardedVideoEventHandler += onRewardedVideoEvent; ad.nativeBannerEventHandler += onNativeBannerEvent; //ad.initAdmob("ca-app-pub-3940256099942544/2934735716", "ca-app-pub-3940256099942544/4411468910");//all id are admob test id,change those to your //ad.setTesting(true);//show test ad #if UNITY_EDITOR ad.initAdmob("ca-app-pub-3940256099942544/2934735716", "ca-app-pub-3940256099942544/4411468910"); //all id are admob test id,change those to your ad.setTesting(true); //show test ad #else ad.initAdmob(bannerID, fullID); //all id are admob test id,change those to your #endif ad.setGender(AdmobGender.MALE); string[] keywords = { "game", "crash", "male game" }; // ad.setKeywords(keywords);//set keywords for ad Debug.Log("admob inited -------------"); }
public void initAds() { Ad = Admob.Instance(); // Delegate event harus yg paling awal Ad.rewardedVideoEventHandler += VideoEventHandler; // kemudian initialize id app Ad.initSDK(IdApp); // kemudian baru initialize id banner/inter/video/native banner Ad.initAdmob(IdBanner, IdIntertisial); // terakhir Load Ads Ad.loadRewardedVideo(IdVideo); Ad.loadInterstitial(); }
void InitAdmob() { _ad = Admob.Instance(); _ad.interstitialEventHandler += OnInterstitialEvent; _ad.rewardedVideoEventHandler += OnRewardedVideoEvent; _ad.initAdmob("ca-app-pub-3940256099942544/2934735716", "ca-app-pub-3940256099942544/4411468910");//all id are admob test id,change those to your _ad.loadRewardedVideo("ca-app-pub-3940256099942544/1712485313"); //ad.setTesting(true);//show test ad _ad.setGender(AdmobGender.MALE); //string[] keywords = { "game", "crash", "male game" }; // ad.setKeywords(keywords);//set keywords for ad Debug.Log("admob inited -------------"); }
void initAdmob() { ad = Admob.Instance(); ad.bannerEventHandler += onBannerEvent; ad.interstitialEventHandler += onInterstitialEvent; ad.rewardedVideoEventHandler += onRewardedVideoEvent; ad.nativeBannerEventHandler += onNativeBannerEvent; ad.initAdmob("ca-app-pub-3940256099942544/2934735716", "ca-app-pub-3940256099942544/4411468910"); //ad.setTesting(true);//show test ad ad.setGender(AdmobGender.MALE); string[] keywords = { "game", "crash", "male game" }; // ad.setKeywords(keywords);//set keywords for ad Debug.Log("admob inited -------------"); }
void initAdmob() { ad = Admob.Instance(); ad.bannerEventHandler += onBannerEvent; ad.interstitialEventHandler += onInterstitialEvent; ad.rewardedVideoEventHandler += onRewardedVideoEvent; ad.nativeBannerEventHandler += onNativeBannerEvent; ad.initAdmob(adBannerId, adInterstitialId); //all id are admob test id,change those to your ad.setTesting(true); //show test ad ad.setGender(AdmobGender.MALE); string[] keywords = { "game", "crash", "male game" }; // ad.setKeywords(keywords);//set keywords for ad Debug.Log("admob inited -------------"); }
void initAdmob() { // isAdmobInited = true; ad = Admob.Instance(); ad.bannerEventHandler += onBannerEvent; ad.interstitialEventHandler += onInterstitialEvent; ad.rewardedVideoEventHandler += onRewardedVideoEvent; ad.initAdmob("ca-app-pub-3076192958641421/3391964194", "ca-app-pub-3076192958641421/4868697393"); // ad.setTesting(true); ad.setGender(AdmobGender.MALE); string[] keywords = { "game", "crash", "male game" }; ad.setKeywords(keywords); Debug.Log("admob inited -------------"); }
void OnGUI() { if (GUI.Button(new Rect(0, 0, 100, 60), "initadmob")) { Admob ad = Admob.Instance(); #if UNITY_IOS ad.initAdmob("ca-app-pub-27960454450664210/xxxxxxxxx", "ca-app-pub-279343530664210/xxxxxxxxxxx"); #else ad.initAdmob("ca-app-pub-27960454450664210/xxxxxxxxx", "ca-app-pub-279343530664210/xxxxxxxxxxx"); #endif // ad.setTesting(true); } if (GUI.Button(new Rect(120, 0, 100, 60), "showfull")) { Admob ad = Admob.Instance(); if (ad.isInterstitialReady()) { ad.showInterstitial(); } else { ad.loadInterstitial(); } } if (GUI.Button(new Rect(240, 100, 100, 60), "showbanner")) { Admob.Instance().showBannerRelative(AdSize.Banner, AdPosition.BOTTOM_CENTER, 0); } if (GUI.Button(new Rect(240, 200, 100, 60), "showbannerABS")) { Admob.Instance().showBannerAbsolute(AdSize.Banner, 0, 30); } if (GUI.Button(new Rect(240, 300, 100, 60), "hidebanner")) { Admob.Instance().removeBanner(); } }
//bool isAdmobInited = false; void initAdmob() { // isAdmobInited = true; ad = Admob.Instance(); // ad.bannerEventHandler += onBannerEvent; // ad.interstitialEventHandler += onInterstitialEvent; //ad.rewardedVideoEventHandler += onRewardedVideoEvent; //ad.nativeBannerEventHandler += onNativeBannerEvent; ad.initAdmob("ca-app-pub-8725679997372244/4435644010", "ca-app-pub-8725679997372244/8865843613"); // ad.setTesting(true); ad.setGender(AdmobGender.MALE); string[] keywords = { "game", "crash", "male game" }; ad.setKeywords(keywords); Debug.Log("admob inited -------------"); }
// ========================================================================== // /* public - [Do] Function * 외부 객체가 호출 */ public static void DoInit() { if (_pAdmob == null) { _pAdmob = Admob.Instance(); } _pAdmob.initAdmob(const_strAdmobID_Banner, const_strAdmobID_FullScreen); DoRequestAdmob_FullScreen(); //DoRequestAdMob_RewardedVideo(); _pAdmob.interstitialEventHandler += EventAdFullScreen; //_pAdmob.rewardedVideoEventHandler += EventAdRewarded; }
void initAdmob() { ad = Admob.Instance(); ad.bannerEventHandler += onBannerEvent; ad.interstitialEventHandler += onInterstitialEvent; ad.rewardedVideoEventHandler += onRewardedVideoEvent; ad.nativeBannerEventHandler += onNativeBannerEvent; ad.initAdmob("ca-app-pub-3940256099942544/2934735716", "ca-app-pub-3940256099942544/4411468910"); //all id are admob test id,change those to your //ad.setTesting(true);//show test ad //ad.setNonPersonalized(true);//if want load NonPersonalized only,set true // ad.setIsDesignedForFamilies(true);//if is Is Designed For Families set true ad.setGender(AdmobGender.MALE); string[] keywords = { "game", "crash", "male game" }; // ad.setKeywords(keywords);//set keywords for ad Debug.Log("admob inited -------------"); }
void OnGUI() { if (GUI.Button(new Rect(0, 0, 100, 60), "initadmob")) { Admob ad = Admob.Instance(); ad.initAdmob("ca-app-pub-3940256099942544/2934735716", "ca-app-pub-3940256099942544/4411468910"); // ad.setTesting(true); } if (GUI.Button(new Rect(120, 0, 100, 60), "showInterstitial")) { Admob ad = Admob.Instance(); if (ad.isInterstitialReady()) { ad.showInterstitial(); } else { ad.loadInterstitial(); } } if (GUI.Button(new Rect(240, 0, 100, 60), "showRewardVideo")) { Admob ad = Admob.Instance(); if (ad.isRewardedVideoReady()) { ad.showRewardedVideo(); } else { ad.loadRewardedVideo("ca-app-pub-3940256099942544/xxxxxxxxxxx"); } } if (GUI.Button(new Rect(240, 100, 100, 60), "showbanner")) { Admob.Instance().showBannerRelative(AdSize.Banner, AdPosition.BOTTOM_CENTER, 0); } if (GUI.Button(new Rect(240, 200, 100, 60), "showbannerABS")) { Admob.Instance().showBannerAbsolute(AdSize.SmartBanner, 0, 30); } if (GUI.Button(new Rect(240, 300, 100, 60), "hidebanner")) { Admob.Instance().removeBanner(); } }
void OnGUI() { if (GUI.Button(new Rect(0, 0, 100, 60), "initadmob")) { Admob ad = Admob.Instance(); ad.initAdmob("YOUR_VALUE_HERE", "YOUR_VALUE_HERE"); // ad.setTesting(true); } if (GUI.Button(new Rect(120, 0, 100, 60), "showInterstitial")) { Admob ad = Admob.Instance(); if (ad.isInterstitialReady()) { ad.showInterstitial(); } else { ad.loadInterstitial(); } } if (GUI.Button(new Rect(240, 0, 100, 60), "showRewardVideo")) { Admob ad = Admob.Instance(); if (ad.isRewardedVideoReady()) { ad.showRewardedVideo(); } else { ad.loadRewardedVideo("YOUR_VALUE_HERE"); } } if (GUI.Button(new Rect(240, 100, 100, 60), "showbanner")) { Admob.Instance().showBannerRelative(AdSize.Banner, AdPosition.BOTTOM_CENTER, 0); } if (GUI.Button(new Rect(240, 200, 100, 60), "showbannerABS")) { Admob.Instance().showBannerAbsolute(AdSize.SmartBanner, 0, 30); } if (GUI.Button(new Rect(240, 300, 100, 60), "hidebanner")) { Admob.Instance().removeBanner(); } }
//bool isAdmobInited = false; void initAdmob() { // isAdmobInited = true; ad = Admob.Instance(); ad.bannerEventHandler += onBannerEvent; ad.interstitialEventHandler += onInterstitialEvent; ad.rewardedVideoEventHandler += onRewardedVideoEvent; ad.nativeBannerEventHandler += onNativeBannerEvent; //ad.initAdmob("ca-app-pub-2748131901934987/7530858550", "ca-app-pub-2748131901934987/7530858550"); ad.initAdmob("ca-app-pub-3940256099942544/2934735716", "ca-app-pub-3940256099942544/4411468910"); // ad.setTesting(true); ad.setGender(AdmobGender.MALE); string[] keywords = { "game", "crash", "male game" }; ad.setKeywords(keywords); Debug.Log("admob inited -------------"); ShowBannerAd(); }
//bool isAdmobInited = false; void initAdmob() { // isAdmobInited = true; ad = Admob.Instance(); ad.bannerEventHandler += onBannerEvent; ad.interstitialEventHandler += onInterstitialEvent; ad.rewardedVideoEventHandler += onRewardedVideoEvent; ad.nativeBannerEventHandler += onNativeBannerEvent; ad.initAdmob(admobBannerID, admobInterstitialID); //ad.setTesting(true); Debug.Log("Admob Inited."); //showBannerAd (always) Admob.Instance().showBannerRelative(AdSize.Banner, AdPosition.BOTTOM_CENTER, 0); //cache an Interstitial ad for later use ad.loadInterstitial(); }
void Start() { Admob.Instance().bannerEventHandler += onBannerEvent; Admob.Instance().interstitialEventHandler += onInterstitialEvent; Admob.Instance().rewardedVideoEventHandler += onRewardedVideoEvent; Admob ad = Admob.Instance(); ad.initAdmob("app id", "app id"); // See it in your admob account for particular app. Get these ids from Admob account. int choose = Random.Range(0, 3); // Randomly selection of what to display....... switch (choose) { case 0: // Full Screen Ads... ad = Admob.Instance(); if (ad.isInterstitialReady()) { ad.showInterstitial(); } else { ad.loadInterstitial(); } break; case 1: // Rewarded Videos ad = Admob.Instance(); if (ad.isRewardedVideoReady()) { ad.showRewardedVideo(); } else { ad.loadRewardedVideo("ca-app-pub-3940256099942544/xxxxxxxxxxx"); // Provide your Id here... } break; case 2: // Banner Ads Admob.Instance().showBannerRelative(AdSize.Banner, AdPosition.BOTTOM_CENTER, 0); break; } }
//bool isAdmobInited = false; void initAdmob() { // isAdmobInited = true; ad = Admob.Instance(); ad.bannerEventHandler += onBannerEvent; ad.interstitialEventHandler += onInterstitialEvent; //ad.rewardedVideoEventHandler += onRewardedVideoEvent; //ad.nativeBannerEventHandler += onNativeBannerEvent; ad.initAdmob("ca-app-pub-8885442409308081/3508865453", "ca-app-pub-8885442409308081/6462331852"); //ad.initAdmob("ca-app-pub-3940256099942544/2934735716", "ca-app-pub-3940256099942544/4411468910"); // ad.setTesting(true); //if (Random.Range(0, 2) ==0) // ad.setGender(AdmobGender.FEMAIL); //else // ad.setGender(AdmobGender.MALE); // string[] keywords = { "game", "couple", "community" }; // ad.setKeywords(keywords); // Debug.Log("admob inited -------------"); }
// Use this for initialization void Start() { // Admob.Instance().bannerEventHandler += onBannerEvent; Admob.Instance().interstitialEventHandler += onInterstitialEvent; // Admob.Instance().rewardedVideoEventHandler += onRewardedVideoEvent; Admob.Instance().setTesting(true); Admob ad = Admob.Instance(); ad.initAdmob("ca-app-pub-xxxxxxxxxxxxxxxx/xxxxxxxxxx", "ca-app-pub-2916476108966190/9838939664"); // if (ad.isInterstitialReady()) // { // ad.showInterstitial(); // } // else // { // ad.loadInterstitial(); // } }