Reputation: 137
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:
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();
}
}
}
Upvotes: 3
Views: 3347
Reputation: 137
OK! Finally I found a solution. Indeed, there was an issue with the project settings, that is why it gave the "IDnumber is not enabled" error. What I did is from the newly created project i copied all the .asset files and overwrite the existed files in the old project. For me is the following path:
User\Documents\newproject\ProjectSettings\
Now everything works fine. The only downside is that I need to redo some settings such as orientations, etc. I think copying only the UnityConnectSettings.asset would have solved the issue.
Anyway, thanks for everyone for helps!
Upvotes: 2