- Home /
Question by
Divinitize1 · Dec 09, 2019 at 04:50 PM ·
functionnot workingadmobcallback
Admob, Can't call a function from HandleUserEarnedReward() for some reason.
public void HandleUserEarnedReward(object sender, Reward args)
{
string type = args.Type;
double amount = args.Amount;
MonoBehaviour.print(
"HandleRewardedAdRewarded event received for "
+ amount.ToString() + " " + type);
if(someBool)
{
save.something ++; //WORKS
StopTimer(); //DON'T WORK
ui.somethingElse(); //DON'T WORK
someBool = false; //WORKS
}
}
Just Want to make sure I'm not missing something obvious, I won't post the full script here as likely if anyone has the answer to this it's if they've used Admob themselves.
And to clarify testing this on Android, The AD shows, the reward is given but the functions are not called from the rewardHandler. I can provide any more info if you have questions to help me solve.
Comment