Banner Ad in Unity[Android]


Hi guys,

I have a problem with the banner ad. I wrote the script so that the banner will be created when the player dies. So a beta tester said to me that the banner shows immediately after the game starts but I want that the banner should create when the player dies.

I checked my scripts but I couldn’t find anything that creates the banner at the beginning.

public void GameOver(){
	StartCoroutine (OpenGameOverMenu ());
	MoPub.createBanner (BannerID, MoPubAdPosition.TopCenter);

Should I delete the “MoPubEventListener” gameobject at my scene or is this necessary?

I hope someone can help me.


Hey there,

MoPub.createBanner is the only way to create a banner. Perhaps you can put a log message in the GameOver function to see if it’s getting called somehow?

MoPubEventListener is there if you need to handle events from the SDK - e.g. pausing the game when the user clicks on an ad.

Please feel free to email if you have additional questions.