Group Group Group Group Group Group Group Group Group

raywenderlich.com Forums

Integrating Unity Ads into Your Game

Learn how to integrate Unity Ads into your game.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/879-integrating-unity-ads-into-your-game

Thanks for your article, however, when I ran the application, the results displayed as follows:
Unity Ads initialized: False
Unity Ads is supported: True
Unity Ads test mode enabled: True
Ad does not appear. I do not know where the error?

Hi @thaomy

Can you check which version of Unity 3D you are running? Did you try the finished/final project as well? Did you see any errors in the console apart from the output you pasted?

If you let me know the above, I’ll check the project files too and ensure it still works for me.

Sean

Hi again!

OK I just tried the project out with Unity 5.6 and apart from linking the project to my own Unity Ads organization, I found that I needed to manually initialize ads in the Start() method of AdManager.cs.

Normally the ads framework does this for you when the project is linked, but for some reason it wasn’t working for me now. To fix, just find your Game’s Ads ID (for Android or iOS), and in AdManager.cs do:

void Start() {

    Advertisement.Initialize("YOUR_ADS_ID_HERE");

	Debug.Log("Unity Ads initialized: " + Advertisement.isInitialized);
	Debug.Log("Unity Ads is supported: " + Advertisement.isSupported);
	Debug.Log("Unity Ads test mode enabled: " + Advertisement.testMode);
}

Cheers
Sean

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]