void Awake() { Intestinal_Ad_Create(); BannerAd l_newBanner = AdmobManager.Prepare <BannerAd>("Banner-1"); l_newBanner.AdUnitId = "ca-app-pub-6065714673957825/3329761668"; //l_newBanner.SetPosition(EPosition.CENTER_HORIZONTAL, EPosition.TOP); l_newBanner.BannerType = EBannerAdType.BANNER; l_newBanner.Orientation = EOrientation.HORIZONTAL; l_newBanner.AnimInType = EAnimationInType.FADE_IN; l_newBanner.AnimOutType = EAnimationOutType.SLIDE_OUT_RIGHT; l_newBanner.SetPosition(EPosition.CENTER, EPosition.BOTTOM); l_newBanner.Create(); l_newBanner.Load(); }
void Start() { BannerAd l_newBanner = AdmobManager.Prepare <BannerAd>("Banner-1"); l_newBanner.AdUnitId = "ca-app-pub-6065714673957825/1329600461"; //l_newBanner.SetPosition(EPosition.CENTER_HORIZONTAL, EPosition.TOP); l_newBanner.BannerType = EBannerAdType.BANNER; l_newBanner.Orientation = EOrientation.HORIZONTAL; l_newBanner.AnimInType = EAnimationInType.FADE_IN; l_newBanner.AnimOutType = EAnimationOutType.SLIDE_OUT_RIGHT; l_newBanner.SetPosition(EPosition.CENTER, EPosition.BOTTOM); l_newBanner.Create(); l_newBanner.Load(); Intestinal_Ad_Create(); StartCoroutine("MoveScreen"); }
void DrawBannerAdvs() { m_rect.x = 20; m_rect.y = 50; m_rect.width = Screen.width * 0.2f; m_rect.height = Screen.height * 0.12f; if (GUI.Button(m_rect, "Create Banner")) { //AdmobManager.CreateBannerAd("Banner_1"); //Simple, with default options //OR BannerAd l_bannerAd = AdmobManager.Prepare <BannerAd>("Banner_1"); l_bannerAd.BannerType = EBannerAdType.SMART_BANNER; l_bannerAd.Orientation = EOrientation.HORIZONTAL; l_bannerAd.AnimInType = EAnimationInType.FADE_IN; l_bannerAd.AnimOutType = EAnimationOutType.SLIDE_OUT_RIGHT; l_bannerAd.SetPosition(EPosition.CENTER_HORIZONTAL, EPosition.BOTTOM); //Admob Callbacks l_bannerAd.OnAdLoaded += MyCustom_OnAdLoadedEvent; l_bannerAd.Create(); } m_rect.y = m_rect.y + m_rect.height; if (GUI.Button(m_rect, "Load Banner")) { AdmobManager.Load("Banner_1"); //OR //BannerAd l_bannerAd = AdmobManager.Get<BannerAd>("Banner_1"); //l_bannerAd.Load(); } m_rect.y = m_rect.y + m_rect.height; if (GUI.Button(m_rect, "Show Adv")) { AdmobManager.ShowBanner("Banner_1"); //OR //BannerAd l_bannerAd = AdmobManager.Get<BannerAd>("Banner_1"); //l_bannerAd.Show(); } m_rect.y = m_rect.y + m_rect.height; if (GUI.Button(m_rect, "Hide Adv")) { AdmobManager.HideBanner("Banner_1"); //OR //BannerAd l_bannerAd = AdmobManager.Get<BannerAd>("Banner_1"); //l_bannerAd.Hide(); } m_rect.y = m_rect.y + m_rect.height; if (GUI.Button(m_rect, "Remove Immediately")) { AdmobManager.RemoveAdImmediately("Banner_1"); } m_rect.y = m_rect.y + m_rect.height; if (GUI.Button(m_rect, "Reposition")) { BannerAd l_bannerAd = AdmobManager.Get <BannerAd>("Banner_1"); l_bannerAd.Reposition(EPosition.TOP, EPosition.CENTER_HORIZONTAL); } m_rect.y = m_rect.y + m_rect.height; if (GUI.Button(m_rect, "Create with New AdUnitID")) { BannerAd l_newBanner = AdmobManager.Prepare <BannerAd>("banner_with_diff_unit_id"); l_newBanner.AdUnitId = "ca-app-pub-4192487455949741/8385716917"; l_newBanner.SetPosition(EPosition.CENTER_HORIZONTAL, EPosition.TOP); l_newBanner.Create(); l_newBanner.Load(); } }