- 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.
For more information, see documentation on platform dependent compilation.