Quantcast
Channel: Questions in topic: "ads"
Viewing all articles
Browse latest Browse all 1416

How to display Unity Ads after 5 deaths?

$
0
0
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(); } } }

Viewing all articles
Browse latest Browse all 1416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>