Вот скрипт
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Advertisements;
using UnityEngine.UI;
public class UnityAds : MonoBehaviour, IUnityAdsListener
{
string placement = "rewardedVideo";
public float money;
public Text moneyTxt;
void Start()
{
Advertisement.AddListener(this);
Advertisement.Initialize("4037106", true);
}
public void OnUnityAdsDidFinish(string placementId, ShowResult showResult)
{
if (showResult == ShowResult.Finished)
{
moneyTxt.text = "Money:" + money++;
}
else if (showResult == ShowResult.Failed)
{
//On no!
}
}
public void OnUnityAdsDidStart(string placementId)
{
}
public void OnUnityAdsReady(string placementId)
{
}
public void OnUnityAdsDidError(string message)
{
}
public void ShowUnityAD(string p)
{
Advertisement.Show(p);