Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

how to show ad at the end like flappy bird? iOS

$
0
0
Hi all, I've done the whole mob ad deal from here (https://github.com/googleads/googleads-mobile-plugins/tree/master/unity) and I got to the point where I have my ad show up at the beginning of the game and is then hidden when the player touches on the START button on my first scene. I put the script (AdScript) with the RequestBanner, hideBanner and showBanner methods in an empty prefab with the DontDestroyOnLoad(transform.gameObject); on Awake void so it stays on through the 3 scenes of my game. I do this because apparently Google does not like it when an ad is requested more than a few times per session. I thought I could then call the showBanner method from a script in another object with a function event since this function(method) already instantiates a bunch of my game over GUI Textures and GUI Texts (with current and best score): Public void gameOverStuff(){ ... AdScript adScript = GetComponent(); adScript.showBanner(); } or public AdScript adScript; Public void gameOverStuff() { ... adScript.showBanner(); } But, neither is working. . . I am not getting any errors but I am also not getting the banner ad to show when the gameOverStuff function event is called. Yes, I added the empty with the AdScript into the adScript slot in the editor. I could try destroying and instantiating the empty prefab with my AdScript requesting the banner on awake but that just sounds so dirty. I hope it makes sense. My head is spinning now. Thanks!

Viewing all articles
Browse latest Browse all 4709

Trending Articles



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