void Awake() { if (LaunchManager.IsFirstLaunchForCurrentSession) { AdsRemoved = PlayerPrefs.GetInt("RemoveAds", 0) == 1; DontDestroyOnLoad(gameObject); instance = this; #if UNITY_ANDROID AppLovin.SetSdkKey(SDK_KEY); AppLovin.InitializeSdk(); AppLovin.SetUnityAdListener(gameObject.name); if (!AdsRemoved) { AppLovin.PreloadInterstitial(); ShowBanner(); } AppLovin.LoadRewardedInterstitial(); #elif UNITY_IOS if (!LaunchManager.IsFirstSession) { Init(); } #endif } else { #if UNITY_IOS if (!SkyRiseAds.instance.IsInit) { SkyRiseAds.instance.Init(); } #endif Destroy(gameObject); } }
// Use this for initialization void Start() { AppLovin.SetSdkKey(SDK_KEY); AppLovin.InitializeSdk(); AppLovin.SetUnityAdListener(this.gameObject.name); StartCoroutine(CallAds()); }
/// <summary> /// Initializing AppLovin /// </summary> /// <param name="consent">user consent -> if true show personalized ads</param> /// <param name="platformSettings">contains all required settings for this publisher</param> public void InitializeAds(UserConsent consent, UserConsent ccpaConsent, List <PlatformSettings> platformSettings) { debug = Advertisements.Instance.debug; if (initialized == false) { if (debug) { AppLovin.SetVerboseLoggingOn("true"); } //get settings #if UNITY_ANDROID PlatformSettings settings = platformSettings.First(cond => cond.platform == SupportedPlatforms.Android); #endif #if UNITY_IOS PlatformSettings settings = platformSettings.First(cond => cond.platform == SupportedPlatforms.iOS); #endif //preparing AppLovin SDK for initialization Debug.Log("APPID: " + settings.appId.id.ToString()); AppLovin.SetSdkKey(settings.appId.id.ToString()); if (consent == UserConsent.Accept || consent == UserConsent.Unset) { AppLovin.SetHasUserConsent("true"); } else { AppLovin.SetHasUserConsent("false"); } if (settings.directedForChildren == true) { AppLovin.SetIsAgeRestrictedUser("true"); } else { AppLovin.SetIsAgeRestrictedUser("false"); } AppLovin.InitializeSdk(); AppLovin.SetUnityAdListener(gameObject.name); if (debug) { Debug.Log(this + " " + "Start Initialization"); ScreenWriter.Write(this + " " + "Start Initialization"); Debug.Log(this + " SDK key: " + settings.appId.id); ScreenWriter.Write(this + " SDK key: " + settings.appId.id); } //start loading ads PreloadInterstitial(); PreloadRewardedVideo(); initialized = true; } }
public void InitInterstitial() { Debug.Log("init applovin"); #if !UNITY_EDITOR AppLovin.SetSdkKey(Data.UnitId.Trim()); AppLovin.InitializeSdk(); #endif }
void Start() { AppLovin.SetSdkKey(SDK_KEY); AppLovin.InitializeSdk(); // AppLovin.SetTestAdsEnabled("true"); AppLovin.SetUnityAdListener(gameObject.name); // gameobject with name ApplovinListener Invoke("LoadVideoDelay", 5f); }
void Start() { m_rewardDelegate = EmptyMothod; #if !UNITY_EDITOR AppLovin.SetSdkKey("cBmxxgR0WEQ2g9uRR0mbcORZUeFHePvFbfAXKcTsrzvW7nzZniAN6cyaFCsucm8DPJllwHbmFUHNFFx0y5O2hL"); AppLovin.InitializeSdk(); AppLovin.LoadRewardedInterstitial(); AppLovin.SetUnityAdListener(gameObject.name); #endif }
// Use this for initialization private void Awake() { instance = this; Application.targetFrameRate = 60; isGameOver = false; AppLovin.SetSdkKey("Mw_ES5QLA1N9SQwMF5ZANA5GH26ffm80f8E7DfSNgqX8ERUUX3evEkAVnGAQ0JRgRfofKE203Z8I0cnTgPSv8c"); AppLovin.InitializeSdk(); AppLovin.SetUnityAdListener("_GameManager"); AppLovin.PreloadInterstitial(); AppLovin.LoadRewardedInterstitial(); }
// Token: 0x06000DD3 RID: 3539 RVA: 0x000583B4 File Offset: 0x000567B4 private void Start() { if (Application.platform == RuntimePlatform.Android && !Application.isEditor) { Advertisement.Initialize(Adpack.Unity_ID); AppLovin.SetSdkKey(Adpack.apploving); AppLovin.InitializeSdk(); AppLovin.SetUnityAdListener(base.gameObject.name); AppLovin.PreloadInterstitial(null); } this.levelname = Application.loadedLevelName; }
void Start() { AppLovin.SetSdkKey("olBOk_uLFb1yeS_dE9st2CCM_h1JdfxztmFM5eo1xUXTtUH3cioKSsHOEwJ1dkpKUEhgL5s61Z0psbTXhrH8w9"); //绑定应用ID AppLovin.InitializeSdk(); //初始化applovin Sdk AppLovin.SetTestAdsEnabled("true"); //在游戏测试阶段需设置为true,在游戏上线后关闭将此关闭为false。 AppLovin.SetUnityAdListener(gameObject.name); //添加侦听器 需要传入你applovin管理脚本所挂载的游戏对象名。 LoadInsert(); //预加载 插页广告 LoadRewarded(); //预加载 奖励视频 }
protected override void InternalInit() { #if EM_APPLOVIN mAdSettings = EM_Settings.Advertising.AppLovin; mCustomRewardedVideoAds = new List <AdPlacement>(); mCustomInterstitialAds = new List <AdPlacement>(); mCustomBanners = new Dictionary <AdPlacement, KeyValuePair <BannerAdPosition, BannerAdSize> >(); // Set GDPR consent if any. var consent = GetApplicableDataPrivacyConsent(); ApplyDataPrivacyConsent(consent); AppLovin.SetSdkKey(mAdSettings.SDKKey); AppLovin.InitializeSdk(); // Test Mode if (mAdSettings.EnableTestMode) { AppLovin.SetTestAdsEnabled("true"); } else { AppLovin.SetTestAdsEnabled("false"); } // Age-Restricted if (mAdSettings.AgeRestrictMode) { AppLovin.SetIsAgeRestrictedUser("true"); } else { AppLovin.SetIsAgeRestrictedUser("false"); } AppLovin.LoadRewardedInterstitial(); // Setup Events Listener GameObject listener = new GameObject(); listener.name = "EM_AppLovinAdsListenerObject"; UnityEngine.Object.Instantiate(listener, Vector3.zero, Quaternion.identity); listener.AddComponent <EM_AppLovinAdsListener>(); listener.GetComponent <EM_AppLovinAdsListener>().setAdClient(this); AppLovin.SetUnityAdListener("EM_AppLovinAdsListenerObject"); // Done Initialization. mIsInitialized = true; Debug.Log("AppLovin client has been initialized."); #endif }
/// <summary> /// Initialize Applovin SDK. /// </summary> /// <param name="preLoadAds">Enable pre-load ads.</param> public void InitializeApplovin(bool preLoadAds = true, string listenergo = null) { AppLovin.SetSdkKey("kVL0LZFNc8EVPKb9s4tuJRZOu0UHxTphLiVnq4BoOahg-2NEK5Urh5f3gu7G9ttx9FkLeHvD7v08TMOrF-w1Hv"); AppLovin.InitializeSdk(); AppLovin.SetTestAdsEnabled("true"); AppLovin.SetUnityAdListener(listenergo); if (preLoadAds) { AppLovin.LoadRewardedInterstitial(); AppLovin.PreloadInterstitial(); } Debug.Log("<color=blue> AppLovin Initialized.</color>"); }
// Use this for initialization void Start() { if (PlayerPrefs.GetInt("IsPurchased", 0) == 0) { AppLovin.SetSdkKey("Ue9JOxMHwDTavooHX8KiEwE7ITMCUVTz9cHTTdrTsI2m5q1cyMKBHTIZ5fnZAEXJsqsORhtI-w24k4hgQ0shZ9"); AppLovin.InitializeSdk(); GetComponent <GoogleMobileAdsDemoScript>().RequestBanner(); } if (PlayerPrefs.GetInt("SoundOnOff", 1) == 1) { GetComponent <AudioSource>().clip = audios[UnityEngine.Random.Range(0, 5)]; GetComponent <AudioSource>().Play(); } }
public void Init() { if (!IsInit) { AppLovin.SetSdkKey(SDK_KEY); AppLovin.InitializeSdk(); AppLovin.SetUnityAdListener(gameObject.name); IsInit = true; Debug.Log("ads are removed: " + AdsRemoved); if (!AdsRemoved) { AppLovin.PreloadInterstitial(); ShowBanner(); } AppLovin.LoadRewardedInterstitial(); } }
void Start() { // Setup UI RewardedVideoButtonTitle = GameObject.Find("RewardedVideoButtonTitle").GetComponent <Text> (); RewardedVideoButtonTitle.text = REWARDED_VIDEO_BUTTON_TITLE_PRELOAD; StatusText = GameObject.Find("StatusText").GetComponent <Text> (); StatusText.text = ""; // Check if user replaced the SDK key if ("YOUR_SDK_KEY_HERE".Equals(SDK_KEY)) { StatusText.text = "ERROR: PLEASE UPDATE YOUR SDK KEY IN Assets/MainMenu.cs"; } else { // Set SDK key and initialize SDK AppLovin.SetSdkKey(SDK_KEY); AppLovin.InitializeSdk(); AppLovin.SetUnityAdListener("MainMenu"); AppLovin.SetRewardedVideoUsername("demo_user"); } }
// Token: 0x06000CB6 RID: 3254 RVA: 0x000502DC File Offset: 0x0004E6DC private void Start() { Time.timeScale = 1f; this.audio = base.GetComponent <AudioSource>(); this.audio.volume = 1f; this.defaultClip = this.audio.clip; Screen.orientation = ScreenOrientation.LandscapeLeft; this.exitscreen = this.exitscreen.GetComponent <Canvas>(); this.exitscreen.enabled = false; base.StartCoroutine(this.StartButtons()); if (Application.platform == RuntimePlatform.Android && !Application.isEditor) { Advertisement.Initialize(Adpack.Unity_ID); Admob.Instance().removeBanner("defaultBanner"); Admob.Instance().initAdmob(Adpack.AD_MOB_ID, Adpack.AD_MOB_INTERSTITIAL_ID); Admob.Instance().loadInterstitial(); HeyzapAds.Start("20af69e9c1ecd52279380e39b0c6216f", 0); HZInterstitialAd.fetch("default"); AppLovin.SetSdkKey(Adpack.apploving); AppLovin.InitializeSdk(); AppLovin.SetUnityAdListener(base.gameObject.name); AppLovin.PreloadInterstitial(null); } }
// Use this for initialization void Awake() { //Set Static flags ChartBoostActiveStaticFlag = ChartBoostActiveFlag; RevMobActiveStaticFlag = RevMobActiveFlag; AdMobActiveStaticFlag = AdMobActiveFlag; PlayHavenActiveStaticFlag = PlayHavenActiveFlag; IAdsActiveStaticFlag = IAdsActiveFlag; TapJoyActiveStaticFlag = TapJoyActiveFlag; VungleActiveStaticFlag = VungleActiveFlag; FlurryActiveStaticFlag = FlurryActiveFlag; AppLovinStaticFlag = AppLovinFlag; //Initialize ChartBoost if (ChartBoostActiveFlag) { ChartBoostBinding.init(ChartBoostID, ChartBoostSIG, false); ChartBoostBinding.cacheInterstitial(null); ChartBoostBinding.cacheMoreApps(); } //Initialize RevMob if (RevMobActiveFlag) { REVMOB_APP_IDS.Add("IOS", RevMobID); revMobSession = RevMob.Start(REVMOB_APP_IDS); } //Initialize Admob if (AdMobActiveFlag) { AdMobBinding.init(AdMobID); } //Initialize Playhaven if (PlayHavenActiveFlag) { gameObject.SendMessage("OpenNotification"); } //Initialize iAds if (IAdsActiveFlag) { } //Initialize TapJoy if (TapJoyActiveFlag) { TapjoyPluginIOS.RequestTapjoyConnect(TapJoyID, TapJoySecretKey); Debug.Log("Tapjoy integrated"); } //Initialize Vungle if (VungleActiveFlag) { VungleBinding.startWithAppId(VungleID); } //Initialize Flurry if (FlurryActiveFlag) { FlurryBinding.startSession(FlurryID); //FlurryBinding.logEvent("Testing session started", false); } if (AppLovinFlag) { AppLovin.SetSdkKey(AppLovinID); AppLovin.InitializeSdk(); } }
void Start() { #if UNITY_ANDROID #elif UNITY_IPHONE AppLovin.SetSdkKey("blT3W15rTlQhPKkcarKUZZ46toGIC1vDT62aVhQucHACCSDo7xaRPFVtAHpG5sE6SsB2pu8xHmxy6OFnFvth2s"); #endif AppLovin.InitializeSdk(); AppLovin.SetUnityAdListener("AppLovinListener"); AppLovin.ShowAd(AppLovin.AD_POSITION_CENTER, AppLovin.AD_POSITION_BOTTOM); AppLovin.LoadRewardedInterstitial(); if (PlayerPrefs.HasKey("BallAvailability") && PlayerPrefs.HasKey("NetAvailability") && PlayerPrefs.HasKey("FloorAvailability")) { } else { PlayerPrefs.SetInt("BallAvailability", 1); PlayerPrefs.SetInt("NetAvailability", 1); PlayerPrefs.SetInt("FloorAvailability", 1); } ballSkins = new Sprite[5]; ballSkins[0] = basketBall; ballSkins[1] = tennisBall; ballSkins[2] = soccerBall; ballSkins[3] = bowlingBall; ballSkins[4] = volleyBall; ball.sprite = ballSkins[PlayerPrefs.GetInt("CurrentBall")]; netSkins = new Sprite[5]; netSkins[0] = netOne; netSkins[1] = netTwo; netSkins[2] = netThree; netSkins[3] = netFour; netSkins[4] = netFive; net.sprite = netSkins[PlayerPrefs.GetInt("CurrentNet")]; floorSkins = new Sprite[5]; floorSkins[0] = floorOne; floorSkins[1] = floorTwo; floorSkins[2] = floorThree; floorSkins[3] = floorFour; floorSkins[4] = floorFive; floor.sprite = floorSkins[PlayerPrefs.GetInt("CurrentFloor")]; Time.timeScale = 1; Button playBtn = play.GetComponent <Button>(); playBtn.onClick.AddListener(PlayButtonClick); Button leaderboardBtn = leaderboard.GetComponent <Button>(); leaderboardBtn.onClick.AddListener(LeaderboardButtonClick); Button rateBtn = rate.GetComponent <Button>(); rateBtn.onClick.AddListener(RateButtonClick); Button classicBtn = classic.GetComponent <Button>(); classic.onClick.AddListener(ClassicButtonClick); Button timeBtn = time.GetComponent <Button>(); time.onClick.AddListener(TimeButtonClick); Button hardBtn = hard.GetComponent <Button>(); hard.onClick.AddListener(HardButtonClick); Button backBtn = back.GetComponent <Button>(); back.onClick.AddListener(BackButtonClick); Button customizeBtn = customize.GetComponent <Button>(); customize.onClick.AddListener(CustomizeButtonClick); #if UNITY_ANDROID leaderboardBtn.gameObject.SetActive(false); #elif UNITY_IPHONE Social.localUser.Authenticate(ProcessAuthentication); #endif }