This post contains all the code that’s been written in the YouTube video.
You can read it at your own pace, although watching the video prior to looking at this code example is recommended.
AdManager.cs
using UnityEngine;
using AppodealAds.Unity.Api;
using AppodealAds.Unity.Common;
public class AdManager : MonoBehaviour, IRewardedVideoAdListener {
int timesTriedToShowInterstitial = 0;
// Use this for initialization
void Start () {
string appKey = "Put your app key here.";
Appodeal.disableLocationPermissionCheck();
Appodeal.setTesting(true);
Appodeal.initialize(appKey, Appodeal.INTERSTITIAL | Appodeal.BANNER | Appodeal.REWARDED_VIDEO);
Appodeal.setRewardedVideoCallbacks(this);
}
public void ShowBanner()
{
if (Appodeal.isLoaded(Appodeal.BANNER))
Appodeal.show(Appodeal.BANNER_TOP);
}
public void HideBanner()
{
Appodeal.hide(Appodeal.BANNER);
}
public void ShowInterstitial()
{
timesTriedToShowInterstitial++;
if (Appodeal.isLoaded(Appodeal.INTERSTITIAL) && timesTriedToShowInterstitial >= 5)
{
Appodeal.show(Appodeal.INTERSTITIAL);
timesTriedToShowInterstitial = 0;
}
}
public void ShowRewarded()
{
if (Appodeal.isLoaded(Appodeal.REWARDED_VIDEO))
Appodeal.show(Appodeal.REWARDED_VIDEO);
}
public void onRewardedVideoLoaded() { }
public void onRewardedVideoFailedToLoad() { }
public void onRewardedVideoShown() { }
public void onRewardedVideoClosed() { }
public void onRewardedVideoFinished(int amount, string name) { ManagerScript.Instance.Coins++; }
}
ManagerScript.cs
using UnityEngine;
using UnityEngine.UI;
public class ManagerScript : MonoBehaviour {
public static ManagerScript Instance { get; private set; }
public Text CoinsTxt;
private int coins;
public int Coins
{
get
{
return coins;
}
set
{
coins = value;
CoinsTxt.text = coins.ToString();
}
}
private void Awake()
{
if (Instance == null)
{
Instance = this;
DontDestroyOnLoad(gameObject);
}
else
Destroy(gameObject);
}
}

Please upload the scene or the project that would be great or would be so kind to send me to [email protected], greetings from venezuela
Not Working
Error
Assets/AdManager.cs(6,14): error CS0535: `AdManager’ does not implement interface member `AppodealAds.Unity.Common.IRewardedVideoAdListener.onRewardedVideoClosed(bool)’
Hi, Please We wan’t Explain how to add (GDPR) in appodeal please
Thanks for advice!
error CS0535: `AdManager’ does not implement interface member `AppodealAds.Unity.Common.IRewardedVideoAdListener.onRewardedVideoClosed(bool)’
Any idea why?
Thanks for sharing. I read many of your blog posts, cool, your blog is very good.
Your article helped me a lot, is there any more related content? Thanks!
Your point of view caught my eye and was very interesting. Thanks. I have a question for you.
Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.
Your article helped me a lot, is there any more related content? Thanks! https://accounts.binance.com/ru-UA/register?ref=JVDCDCK4