Quantcast
Channel: Questions in topic: "admob"
Viewing all articles
Browse latest Browse all 137

Addmob error CS1503: Argument 3: cannot convert from 'method group' to 'Action'

$
0
0
Hey everyone, trying to follow the Add-Mob tutorial! I've tried searching around but no idea what's going on here with this error seems to work for everyone else but not for me :) error is for the RewardedInterstitialAd.LoadAd(adUnitId, request, adLoadCallback); (adLoadCallback) ![alt text][1] \AddMobRewards.cs(19,58): error CS1503: Argument 3: cannot convert from 'method group' to 'Action' using System.Collections; using System.Collections.Generic; using UnityEngine; using GoogleMobileAds; using System; using GoogleMobileAds.Api; using TMPro; public class AddMobRewards : MonoBehaviour { private RewardedInterstitialAd rewardedInterstitialAd; public string adUnitId; public TextMeshProUGUI TimerTime; public void Start() { // Create an empty ad request. AdRequest request = new AdRequest.Builder().Build(); // Load the rewarded ad with the request. RewardedInterstitialAd.LoadAd(adUnitId, request, adLoadCallback); } private void adLoadCallback(RewardedInterstitialAd ad, string error) { if (error == null) { rewardedInterstitialAd = ad; } } public void ShowRewardedInterstitialAd() { if (rewardedInterstitialAd != null) { rewardedInterstitialAd.Show(userEarnedRewardCallback); } } private void userEarnedRewardCallback(Reward reward) { // TODO: Reward the user. } IEnumerator StartRewrdedAddsTimer() { TimerTime.text = "Your Add Beguins In 5"; int t = 5; while(t > 0) { t--; TimerTime.text = "Your Add Beguins In" + t; yield return new WaitForSeconds(1); } } } [1]: /storage/temp/198204-capture.png

Viewing all articles
Browse latest Browse all 137

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>