I need some help with Unity. I am developing a simple mobile game and only the ads left. I am using Unity 5.5.3. I did set up everything in the services and included the code which works fine on PC. When i call the ShowAds function it displays a window says "This screen would be your ad unit, everything seems to be working" However, when i build the game and install on android device the Advertisement.IsReady() comes back with false. I have been researching for 2 days now and still no success! So far:
- Updated Unity to 5.5.4p4
- Disabled the service and started everything from scratch
- Created a code which checks the internet connection which comes back with true.
- Changed the Build Settings/ Player Setting / Internet Access to Require
- Waited for minutes as some says Initialization sometime takes minutes.
Nothing seems to be working. On mobile there is no ads appearing at all. On PC everything works fine. However on PC i got an error says:
gameID "IDnumber" is not enabled
System.Net.Sockets.Worker:Receive()
I did not find any solution for this error so far.
Here are the codes:
IEnumerator TestInternet(){
WWW internet = new WWW ("http://www.google.com");
yield return internet;
if (internet.error != null) {
alertText.text = internet.error;
} else {
alertText.text = "connected";
if (Advertisement.IsReady ()) {
Advertisement.Show ();
alertText.text = Advertisement.IsReady ().ToString();
} else {
alertText.text = Advertisement.IsReady ().ToString();
}
}
}
while(!Advertisement.IsReady ()) yield return null;
then show it when the while loop exist. – Programmer