I am VERY new to C# coding and Unity in general. I have just finished a project and I am wanting to monetize it with Unity Ads. I used the basic code to show an ad every time the replay button is clicked. I don't want to flood the player with ads every time they die and I want to display the ad when they click the button 5 times (which is technically after 5 deaths). Like I said, I am really new to coding and I would really appreciate if someone helped, here is the code (very simple)
using UnityEngine;
using UnityEngine.Advertisements;
public class Ads : MonoBehaviour
{
public void ShowAd()
{
if (Advertisement.IsReady())
{
Advertisement.Show();
}
}
}
↧