Lets say a user has watched an ad i would like to change the reward dependant on how much money i made from the ad. i don't want to use ecpm because that is a average. I want the money from a specific ad.the code i am using the default unity ad code from the tutorial. here it is
const string myPlacementId = "rewardedVideo";
public bool testMode = true;
void Start()
{
Advertisement.AddListener(this);
Advertisement.Initialize(gameId, testMode);
}
public void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
{
ShowRewardedVideo();
}
}
public void ShowRewardedVideo()
{
if (Advertisement.IsReady(myPlacementId))
{
Advertisement.Show(myPlacementId);
}
else
{
Debug.Log("Rewarded video is not ready at the moment! Please try again later!");
}
}
public void OnUnityAdsDidFinish(string placementId, ShowResult showResult)
{
if (showResult == ShowResult.Finished)
{
print("finishedAd");
}
else if (showResult == ShowResult.Skipped)
{
print("skip");
}
else if (showResult == ShowResult.Failed)
{
Debug.LogWarning("The ad did not finish due to an error.");
}
}
thanks in advance.