Make sure that your project in Cloud Build is setup to use the same version of Unity that you’re using on your computer. Cloud Build supports dozens of different Unity versions, and for things like Analytics, it’s important that your editor and Cloud Build are using the same one.
I just checked, and change the unity version build option from Latest 5.x to the specific 5.2.0f3, and i have the exact same version, but the cloud build keep failing with the same compilation error.
Also, does this project compile for iOS and Android when you switch your local editor to these platforms? If you’re developing in Standalone/Desktop (Win/Mac/Linux) mode, you won’t see the same errors as when you tell the editor to specifically build for iOS or Android. In Unity, go to File → Build Settings, then select iOS and click the “Switch Platform” button.
The name `Analytics' does not exist in the current context
Problem occurred after upgrading from 5.1 to 5.2. Unity doesn’t seem to see the UnityEngine.Analytics namespace.
On the top of the file I have
using UnityEngine;
using UnityEngine.Analytics;
I noticed that even auto completion stopped working when I type
UnityEngine. and wait for the popup with all namespaces Analytics is not there as it used to be before the upgrade
@JeanPierre_Bailly Can you direct message me a link to the project in Cloud Build where you’re seeing this? Are your Android/iOS builds based on the same code repository?