Hello,
I integrated unity Ads service into my game using the built in Unity Ad service from the editor. According to the docs the code related to Unity.Advertisement is enclosed in #if UNITY_AD #endif however, when I did that the Unity Cloud Build failed to build my project with an error message saying
17: [Unity] Assets/Scripts/Managers/GameManager.cs(681,9): error CS0246: The type or namespace name `ShowOptions' could not be found. Are you missing `UnityEngine.Advertisements' using directive?
18: [Unity] Assets/Scripts/Managers/GameManager.cs(683,9): error CS0841: A local variable `options' cannot be used before it is declared
19: [Unity] Assets/Scripts/Managers/GameManager.cs(702,9): error CS0103: The name `Advertisement' does not exist in the current context
20: [Unity] Assets/Scripts/Managers/GameManager.cs(706,9): error CS0103: The name `Advertisement' does not exist in the current context
21: [Unity] Assets/Scripts/Managers/GameManager.cs(713,22): error CS0103: The name `InternetConnectionCheck' does not exist in the current context
The game runs and compiles with no issues from the editor.
Is there a reason why it fails to build using Cloud Build? Is the UNITY_AD compiler tag not needed if I am using the Ads Service from the Editor?
Thanks