Search code examples
c#unity-game-engineads

Can not use unity ads due to Multiple versions of plugin


I recently created a game in unity using C#. I decided to add reward ads to my game. So i downloaded the package, created the project and the placement in the dashboard, but when I start to code, exactly at this line inside the void Start() :

if (Advertisement.IsReady("myAd") {

}

I get this error: Severity Code Description Project File Line Suppression State Error CS0433 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 C:\Users\MyName\Documents\MyName\MyGame\Assets\Scripts\AdManagementScript.cs 26 Active

I have no idea what's wrong... Could someone help me, please? Thank you


Solution

  • I would say, try removing the advertisements package from your package manager. Ihave already seen people having issues that were fixed by removing it, so you might as well give it a try. Hope it works!