Unity and China: How does the WWW class check for internet connection on initialization?

Hello!

I have already guaranteed a valid internet connection earlier in my code, and am initializing a WWW instance in the following way:

WWW www = new WWW(url);

When doing so, my application hangs when running from a Chinese IP address but works perfectly well from an American or Canadian IP address.

I have read that when initializing WWW the method checks for an internet connection, and if it doesn’t find one, it gets stuck in an infinite loop of

yield return www;

What I am wondering is, does the initialization of WWW make a call to a website (Google, perhaps) which returns invalid from a Chinese IP? If so, has anyone found a workaround for this?

Thank you!
Laura

As far as I’m aware WWW doesn’t do any initialisation calls. Checking connectivity is a dev responsibility. Plus WWW can be used to call non web resources from the file system too.

It’s not you own web location that’s falling afoul of China’s firewall? Last time I visited China it seemed pretty random what was blocked and what was accessible.

You can also check the WWW.error property to see if an explicit error has been returned.

Thanks @Kiwasi for your reply!

Unfortunately I’m not developing from China - but have users in China - so cannot read the WWW.error logs without creating a new build and sending it to a customer to test (which I’d like to avoid if possible). The Performance Reporting page on Unity Analytics’ dashboard shows no errors around this issue either.

In our server logs, I see that the application is hitting Google but I cannot see from where - we don’t explicitly reference Google in our code, so perhaps there is another Unity plugin that is known to do this? IAP, maybe?

Thanks again, looking forward to cracking this!