initializationListener is null, you will not receive any callbacks - Unity

Viewed 1048
2 Answers

I also encountered the same error.

You need to add the InuityAdsInitializationListener class and the OnInitializationComplete and OnInitializationFailed methods. The error is occurring because of the absence of those.

Please refer here for more information. https://docs.unity.com/ads/InitializingTheUnitySDK.html

You need two things. As said above, you need to implement the IUnityAdsInitializationListener interface as well as it's methods.

However, you also need to tell the Advertisement which class implements that interface inside of your Advertisement.Initailize function. If you are upgrading from an old version, you may not notice the new overloaded functions. Specifically you need to call

Advertisement.Initialize(gameId, testMode, IUnityAdsInitializationListener);

For example:

Advertisement.Initialize(gameId, false, this);
Related