How to prevent Unity ads to be automatically recreated at editor startup

Hello,

Our app is for children, therefore we need to remove Unity Ads.
To do so, I deactivated the service using the services tab.

But every time I restart the editor, the folder com.unity.ads@X.X.X gets recreated which forces me to delete the folder manually before building the app for a given platform.

Here is how to reproduce the problem (version 2019.4.8f1):

  • Create a new empty project
  • Go the services tab and select your organization
  • Activate ‘Ads’ service (this will create com.unity.ads@3.4.7 in Library/PackageCache)
  • Restart the project (optional)
  • Deactivate ‘Ads’ service (this does not delete com.unity.ads@3.4.7 in Library/PackageCache)
  • Delete com.unity.ads@3.4.7 in Library/PackageCache (before or after closing the editor, it doesn’t make any difference)
  • Restart the project…com.unity.ads@3.4.7 is recreated in Library/PackageCache

How can I prevent com.unity.ads@X.X.X to be recreated every time I restart the editor?

It sounds like the ads package is still listed for your project’s package manifest file, which is why the editor is reinstalling it.

Check the package manager in Unity and make sure the Advertisement package is disabled. You can also check the Packages/manifest.json file in your project and remove the com.unity.ads dependency if it exists there.

1 Like