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

How do unity ads need to be shown in editor?

$
0
0
I have a restart button and a main menu button. When the user clicks(taps) any of the buttons my ads should show up. So, I made a adscript to call a restart script. But it didn't work. Please help. my adscript: using UnityEngine; using System.Collections; using UnityEngine.Advertisements; public class adscript : MonoBehaviour { public restart res; // Use this for initialization void Start () { Advertisement.Initialize ("*****"); } // Update is called once per frame void Update () { } public void click() { if (Advertisement.isReady ()) { Advertisement.Show (); Debug.Log ("adshown"); } else { res.cal (); } res.cal (); } }

Viewing all articles
Browse latest Browse all 1416

Trending Articles