Unity 5.2 a) Monetization Settings tab and b) Advertisement.xxx causing NullReferenceException

Hi,

Sorry if this has been answered elsewhere but I’ve been looking via Google and can’t find anything.

I have just upgraded to Unity 5.2 (Mac OS X 10.10.5) and used the built-in Unity Services tab to activate Unity Ads (and setup the app for iOS and Android.)

I am getting NullReferenceException any time I try and do anything with Advertisement functions - even “Advertisement.debugLevel = Advertisement.DebugLevel.Debug;” causes it.

Maybe there’s a library I’m not linking to that I should be?

I’ve not used UnityAds before and the instructions/videos don’t seem to match up with the latest way of doing things from inside Unity 5.2.

Also, I don’t suppose anyone knows where the monetization options are for “Unity 5.2 Apps”? My ad project in unityads.unity3d.com only appear under the “Unity 5.2 Apps” and I can’t find the monetization settings, whereas with the apps under “YOUR GAMES”, it was easily accessible (just click on it and the click on the monetisation settings tab).

Thanks,
Doug

UPDATE - just in case someone else is having problems…

This helped me:

  1. Hadn’t seen that you don’t call Advertisement.Initialise (I missed some instructions at the end of this page: http://docs.unity3d.com/Manual/UnityAdsHowTo.html)
  2. I was setting Advertisement.debugLevel in my component’s Awake() which was happening before Unity’s built-in code to initialise Ads - setting debugLevel just before requesting an ad worked fine.

I haven’t yet worked out how to access Monetization Settings for “Unity 5.2 Apps” though - I’d like to change the ad filters, test options etc. - anyone?

Thanks for your follow up on this. I believe it should also work if you set debugLevel in Start() instead of Awake() method. See e.g. Unity - Manual: Order of execution for event functions

/Rasmus