Esempio n. 1
0
        /// <summary>
        /// Fetches an ad
        /// </summary>
        public static void Fetch()
        {
            #if UNITY_ANDROID
            HZInterstitialAdAndroid.Fetch();
            #endif

            #if UNITY_IPHONE && !UNITY_EDITOR
            HZInterstitialAdIOS.Fetch();
            #endif
        }
Esempio n. 2
0
        /// <summary>
        /// Fetches an ad for the given ad tag.
        /// </summary>
        /// <param name="tag">The ad tag to fetch an ad for.</param>
        public static void Fetch(string tag)
        {
            tag = HeyzapAds.TagForString(tag);

            #if UNITY_ANDROID
            HZInterstitialAdAndroid.Fetch(tag);
            #endif

            #if UNITY_IPHONE && !UNITY_EDITOR
            HZInterstitialAdIOS.Fetch(tag);
            #endif
        }
Esempio n. 3
0
        /// <summary>
        /// Fetches an ad for the given ad tag.
        /// </summary>
        /// <param name="tag">The ad tag to fetch an ad for.</param>
        public static void Fetch(string tag)
        {
            tag = HeyzapAds.TagForString(tag);

            #if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IPHONE)
                #if UNITY_ANDROID
            HZInterstitialAdAndroid.Fetch(tag);
                #elif UNITY_IPHONE
            HZInterstitialAdIOS.Fetch(tag);
                #endif
            #else
            UnityEngine.Debug.LogWarning("Call received to fetch an HZInterstitialAd, but the SDK does not function in the editor. You must use a device/emulator to fetch/show ads.");
            _instance.StartCoroutine(InvokeCallbackNextFrame(HeyzapAds.NetworkCallback.FETCH_FAILED, tag));
            #endif
        }