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

How do I delay an Ad?

$
0
0
So I have have a script that plays an add every 90 seconds. Every time you change scene (which is quite regular) An ad pops up. Does anyone know how to delay this Script: using UnityEngine; using System.Collections; using UnityEngine.Advertisements; public class ShowAds : MonoBehaviour { float timer; void Start() { Advertisement.Initialize (""); //REMEMBER TO EDIT!! } void Update() { timer -= Time.deltaTime; ShowAd (); } public void ShowAd() { if (Advertisement.IsReady () && timer <= 0) { Advertisement.Show (); timer = 90.0f; } } }

Viewing all articles
Browse latest Browse all 1416

Trending Articles



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