Cannot use Unity Ads API


I have an annoying problem with Unity Ads.

Recently, I have installed the Advertisement 3.7.1 package through package manager as referred in documentation “Unity developer integration guides”.

Then I tried to use “UnityEngine.Advertisements” namespace in a monobehaviour classs. But i couldn’t see any suggestions of that namespace on VS.

So i typed it manually as “using UnityEngine.Advertisements” and it didn’t caused any errors.

However, i cannot call any method of Unity Ads API including Advertisement.Initialize.

Please help, i’m stuck :frowning:

Unity Version : 2020.3.8f1 Personal

VS Version : VS Community 2019 v16.9.0

Unity Ads Version : 3.7.1

Target Platform : iOS

Found the issue,

I have separate assemblies for different features, that’s the reason.

To be more precise, you have to give reference to the UnityEngine.Advertisements asm from your assembly definition to be able to use it.