コード例 #1
0
        /// <summary>
        /// Shows a banner ad with the given options.
        /// </summary>
        /// <param name="showOptions">The options with which to show the banner ad, or the defaults if <c>null</c> </param>
        public static void ShowWithOptions(HZBannerShowOptions showOptions)
        {
            if (showOptions == null)
            {
                showOptions = new HZBannerShowOptions();
            }

            #if UNITY_ANDROID
            HZBannerAdAndroid.ShowWithOptions(showOptions);
            #endif

            #if UNITY_IPHONE && !UNITY_EDITOR
            HZBannerAdIOS.ShowWithOptions(showOptions);
            #endif
        }
コード例 #2
0
        /// <summary>
        /// Shows a banner ad with the given options.
        /// </summary>
        /// <param name="showOptions">The options with which to show the banner ad, or the defaults if <c>null</c> </param>
        public static void ShowWithOptions(HZBannerShowOptions showOptions)
        {
            if (showOptions == null)
            {
                showOptions = new HZBannerShowOptions();
            }

            #if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IPHONE)
                #if UNITY_ANDROID
            HZBannerAdAndroid.ShowWithOptions(showOptions);
                #elif UNITY_IPHONE
            HZBannerAdIOS.ShowWithOptions(showOptions);
                #endif
            #else
            UnityEngine.Debug.LogWarning("Call received to show an HZBannerAd, but the SDK does not function in the editor. You must use a device/emulator to fetch/show ads.");
            _instance.StartCoroutine(InvokeCallbackNextFrame(HeyzapAds.NetworkCallback.SHOW_FAILED, showOptions.Tag));
            #endif
        }