When I turn off my internet connection and start the game sometimes I get this error:
“error CS0103: The name `Advertisement’ does not exist in the current context”
In MonoDevelop the “Advertisement” class also turns to red and is unrecognized and after waiting a minute sometimes it turns blue again or I just need to restart Unity and then I can try starting the game again.
I’m using Unity 5.3.5 and built-in Unity Ads.
The code I’m using:
public IEnumerator showAdCoroutine() {
while (!Advertisement.isInitialized || !Advertisement.IsReady()) {
yield return new WaitForSeconds (1);
}
Advertisement.Show();
}