private static void OnInternalRewardedAdCompleted(RewardedAdNetwork network, AdLocation location) { if (RewardedAdCompleted != null) { RewardedAdCompleted(network, location); } }
private static void LoadInterstitialAd(IAdClient client, AdLocation location) { if (IsAdRemoved()) { return; } client.LoadInterstitialAd(location); }
private static bool IsInterstitialAdReady(IAdClient client, AdLocation location) { if (IsAdRemoved()) { return(false); } return(client.IsInterstitialAdReady(location)); }
private static void ShowInterstitialAd(IAdClient client, AdLocation location) { if (IsAdRemoved()) { Debug.Log("Could not show interstitial ad: ads were disabled by RemoveAds()."); return; } client.ShowInterstitialAd(location); }
public static AdPlacement ToAdPlacement(this AdLocation location) { if (location == AdLocation.Default) { return(AdPlacement.Default); } else { return(AdPlacement.PlacementWithName(location.ToString())); } }
public static void ShowInterstitialAd(InterstitialAdNetwork adNetwork, AdLocation location) { ShowInterstitialAd(adNetwork, location.ToAdPlacement()); }
public static bool IsInterstitialAdReady(InterstitialAdNetwork adNetwork, AdLocation location) { return(IsInterstitialAdReady(adNetwork, location.ToAdPlacement())); }
private static void OnInternalInterstitialAdCompleted(InterstitialAdNetwork network, AdLocation location) { if (InterstitialAdCompleted != null) { InterstitialAdCompleted(network, location); } }
private static void ShowRewardedAd(IAdClient client, AdLocation location) { // Note that we don't check if ads were removed because // rewarded ads should still be available after ads removal. client.ShowRewardedAd(location); }
private static bool IsRewardedAdReady(IAdClient client, AdLocation location) { return(client.IsRewardedAdReady(location)); }
/// <summary> /// Determines whether an interstitial ad of the specified ad network, at the specified location, is ready to show. /// - For AdColony, AdMob and Heyzap, the location will be ignored. You can pass <see cref="AdLocation.Default"/>. /// - For Chartboost, select one of available locations or create a new location using <see cref="AdLocation.LocationFromName(name)"/>. /// - For Unity Ads, use <see cref="AdLocation.Default"/> or create a new location for the desired zoneId using <see cref="AdLocation.LocationFromName(zoneId)"/>. /// If the specified network doesn't support interstitial ads, this method always returns false. /// </summary> /// <returns><c>true</c> if interstitial ad is ready for the specified location; otherwise, <c>false</c>.</returns> /// <param name="adNetwork">Ad network.</param> /// <param name="location">Location.</param> public static bool IsInterstitialAdReady(InterstitialAdNetwork adNetwork, AdLocation location) { return(IsInterstitialAdReady(SelectAdClient((AdNetwork)adNetwork), location)); }
/// <summary> /// Shows a rewarded ad of the specified ad network, at the specified location. /// - For AdColony, AdMob and Heyzap, the location will be ignored. You can pass <see cref="AdLocation.Default"/>. /// - For Chartboost, select one of available locations or create a new location using <see cref="AdLocation.LocationFromName(name)"/>. /// - For Unity Ads, use <see cref="AdLocation.Default"/> or create a new location for the desired zoneId using <see cref="AdLocation.LocationFromName(zoneId)"/>. /// If the specified network doesn't support rewarded ads, this method is a no-op. /// </summary> /// <param name="adNetwork">Ad network.</param> /// <param name="location">Location.</param> public static void ShowRewardedAd(RewardedAdNetwork adNetwork, AdLocation location) { ShowRewardedAd(SelectAdClient((AdNetwork)adNetwork), location); }
/// <summary> /// Determines whether a rewarded ad of the specified ad network, at the specified location, is ready to show. /// - For AdColony, AdMob and Heyzap, the location will be ignored. You can pass <see cref="AdLocation.Default"/>. /// - For Chartboost, select one of available locations or create a new location using <see cref="AdLocation.LocationFromName(name)"/>. /// - For Unity Ads, use <see cref="AdLocation.Default"/> or create a new location for the desired zoneId using <see cref="AdLocation.LocationFromName(zoneId)"/>. /// If the specified network doesn't support rewarded ads, this method always returns false. /// </summary> /// <returns><c>true</c> if rewarded ad is ready; otherwise, <c>false</c>.</returns> /// <param name="adNetwork">Ad network.</param> /// <param name="location">Location.</param> public static bool IsRewardedAdReady(RewardedAdNetwork adNetwork, AdLocation location) { return(IsRewardedAdReady(SelectAdClient((AdNetwork)adNetwork), location)); }
/// <summary> /// Shows an interstitial ad of the specified ad network, at the specified location. /// - For AdColony, AdMob and Heyzap, the location will be ignored. You can pass <see cref="AdLocation.Default"/>. /// - For Chartboost, select one of available locations or create a new location using <see cref="AdLocation.LocationFromName(name)"/>. /// - For Unity Ads, use <see cref="AdLocation.Default"/> or create a new location for the desired zoneId using <see cref="AdLocation.LocationFromName(zoneId)"/>. /// If the specified network doesn't support interstitial ads, this method is a no-op. /// </summary> /// <param name="adNetwork">Ad network.</param> /// <param name="location">Location.</param> public static void ShowInterstitialAd(InterstitialAdNetwork adNetwork, AdLocation location) { ShowInterstitialAd(SelectAdClient((AdNetwork)adNetwork), location); }
public static bool IsRewardedAdReady(RewardedAdNetwork adNetwork, AdLocation location) { return(IsRewardedAdReady(adNetwork, location.ToAdPlacement())); }
public static void ShowRewardedAd(RewardedAdNetwork adNetwork, AdLocation location) { ShowRewardedAd(adNetwork, location.ToAdPlacement()); }
private static void LoadRewardedAd(IAdClient client, AdLocation location) { client.LoadRewardedAd(location); }