Exemplo n.º 1
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
            HZVideoAdAndroid.Fetch(tag);
            #endif

            #if UNITY_IPHONE && !UNITY_EDITOR
            HZVideoAdIOS.Fetch(tag);
            #endif
        }
Exemplo 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_EDITOR && (UNITY_ANDROID || UNITY_IPHONE)
                #if UNITY_ANDROID
            HZVideoAdAndroid.Fetch(tag);
                #elif UNITY_IPHONE
            HZVideoAdIOS.Fetch(tag);
                #endif
            #else
            UnityEngine.Debug.LogWarning("Call received to fetch an HZVideoAd, 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
        }