Search Unity

Android Admob Question

Discussion in 'Scripting' started by Jacksendary, May 25, 2015.

  1. Jacksendary

    Jacksendary

    Joined:
    Jan 31, 2012
    Posts:
    408
    Hey all I've for a while tried to make admob work in my game but failed multiple time to make "interstitial" ads.

    Everytime I try to display one the game crashes and instantly restarts. My understanding is the beginning was I could display it at any time I wanted but after looking a bit more for infomation I found this:

    "Unlike banners, interstitial need to be explicitly shown. At an appropriate stopping point in your app, check that the interstitial is ready before showing it"

    So I assume that this mean that I need to place it somewhere I use unity load levels and not where I my self feel there is an appropriate stopping point? and if so how would I implement it in a way such that that game doesn't crash?

    My use of it currently is that I have only one level where I have a main menu and some sub menus after clicking new game it generate a level and hide the menus when the player dies or win I try to display the interstitial ad but my app crashes and restarts at this point.

    So I'm kinda now wondering how I best use interstitial ads and display them correctly without my game crashing, that is if my assumption above is correct that I can't show my interstitial at any time.

    Thanks a lot in regard! :)