// Obtem o video public override void fetchVideo(bool force) { try { if (!force && tried_fetching_video) { return; } base.fetchVideo(force); if (Info.IsEditor()) { return; } #if UNITY_ANDROID Initializate.AddPrefab("VungleAndroidManager", typeof(VungleAndroidManager)); VungleAndroid.init(key); #elif UNITY_IPHONE Initializate.AddPrefab("VungleManager", typeof(VungleManager)); VungleBinding.startWithAppId(key); #endif } catch { Error(API, ERROR_STARTUP_OBJECT); } }
private bool Setup() { if (!firstTime) { return(true); } firstTime = false; try { #if UNITY_ANDROID Initializate.AddPrefab("AdMobAndroidManager", typeof(AdMobAndroidManager)); AdMobAndroidManager.receivedAdEvent += onBannerShowed; AdMobAndroidManager.failedToReceiveAdEvent += onBannerFailed; AdMobAndroid.init(key); #endif return(true); } catch { return(Error(API, ERROR_STARTUP_OBJECT)); } }
private bool Setup() { if (!firstTime) { return(true); } firstTime = false; try { #if UNITY_IPHONE Initializate.AddPrefab("AdManager", typeof(AdManager)); AdBinding.fireHideShowEvents(true); AdManager.adViewDidChange += onAdShowed; #endif return(true); } catch { return(Error(API, ERROR_STARTUP_OBJECT)); } }
// Inicializa a classe Flurry // Essa classe só é instanciada automaticamente pela Advertisement (se o Flurry for solicitado) // Necessario enviar a Key do Flurry ao instanciar public static void Start(string key) { // Se não for mobile (ex: Web), retornar #if UNITY_WEBPLAYER return; #endif // Instancia prefab correta para as diferentes plataformas #if UNITY_IPHONE Initializate.AddPrefab("FlurryManager", typeof(FlurryManager)); if (!Info.IsEditor()) { FlurryBinding.startSession(key); } #elif UNITY_ANDROID Initializate.AddPrefab("FlurryAndroidManager", typeof(FlurryAndroidManager)); if (!Info.IsEditor()) { FlurryAndroid.onStartSession(key, true, true, false); } #endif }