- Home /
Web service not working in Web Player build
var url = "www.readof.com ..............?scene="+Scenes;
var www : WWW = new WWW (url);
yield www;
if (www.error == null){
var dataString = www.text;
print(www.text);
} }
else {
// something wrong!
Debug.Log(www.error);
} }
Hi This is my code. In web player build always get error message, but when I run with unity software,it returns the correct json string.I already try with http:// but ,.............!!!
Thanks
if (www.error == null){
....
}}
You have two closing brackets at the end of both the if and else statement - thought I'd point that out..
Answer by Graham-Dunnett · Oct 25, 2012 at 01:46 PM
Please see:
http://docs.unity3d.com/Documentation/ScriptReference/MonoCompatibility.html
This lists the .Net classes that are supported in the various builds. WebService is not supported.