Why am I getting the error "'Advertisements' does not exist"?


  • I am trying to integrate Unity Ads into my project.
  • I have enabled Unity Ads but I am still getting the error "'Advertisements' does not exist in the namespace 'UnityEngine'".


You are building for a platform that is not supported by Unity Ads or you haven't enabled Ads for your project yet.


  • Ensure Ads is toggled ON in the Services window.
  • Unity Ads is only supported on iOS and Android, so you should select iOS or Android as a build target.
  • If your project is meant to be built for platforms other than iOS and Android, you could add a UNITY_ADS conditional define. This means that building with Unity Ads will not affect other platforms.

More Information

For more information, see documentation on platform dependent compilation.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


  • 0
    Matt Ahrens

    I did all those things and I still get that error, but only when I try to build.

  • 0
    Unity Ads Support

    Hi Matt,

    I am sorry that this is happening.

    Please, can you submit a support ticket to

    Thank you.

    Kind Regards


Please sign in to leave a comment.