My Advertisement script is throwing errors because of Advertisement. , ShowResult. etc.

This might be something obvoius but I have been confused about this for quite a while. I am following this tutorial on YouTube(

) and have downloaded the Unity Ads SDK from the Asset Store. Thank you to anyone who has a solution to this problem!

Here are the errors:

The type ‘ShowResult’ exists in both ‘UnityEngine.Advertisements.Editor, Version=3.4.6.0, Culture=neutral, PublicKeyToken=null’ and ‘UnityEngine.Advertisements, Version=3.4.6.0, Culture=neutral, PublicKeyToken=null’ [Assembly-CSharp]

The type ‘IUnityAdsListener’ exists in both ‘UnityEngine.Advertisements.Editor, Version=3.4.6.0, Culture=neutral, PublicKeyToken=null’ and ‘UnityEngine.Advertisements, Version=3.4.6.0, Culture=neutral, PublicKeyToken=null’ [Assembly-CSharp]

The type ‘Advertisement’ exists in both ‘UnityEngine.Advertisements.Editor, Version=3.4.6.0, Culture=neutral, PublicKeyToken=null’ and ‘UnityEngine.Advertisements, Version=3.4.6.0, Culture=neutral, PublicKeyToken=null’ [Assembly-CSharp]

It looks like your project has two versions of the Ads SDK installed. Make sure Advertisement is disabled in the package manager and also disable Ads from the Unity Services window. You don’t need either of those if you’re using the Asset Store version of the SDK.

1 Like