Hi everyone,
I am having a problem that is driving me a little crazy. I am new to unity (couple of months working with it), but not programming. I have some code that worked in Unity 2.1 and 2.5 on the Mac but it errors out under Windows in 2.5. Basically what I am trying to do is read in some xml resource files and then connect to a couple of webservices to do more complex (web)server-side interaction.
The big caveat is that it worked under 2.1 Mac and continues to work on 2.5 Mac, but when I got a chance to try out 2.5 windows, the code no longer functions.
Here is the error(s) I get:
NotSupportedException: http://www.google.com/
System.Net.WebRequest.GetCreator (System.String prefix)
System.Net.WebRequest.Create (System.Uri requestUri)
System.Net.WebRequest.Create (System.String requestUriString)
CreateCubes.Update () (at Assets\scripts\CreateCubes.js:22)
here is the snippet
var rq : WebRequest;
var rs : HttpWebResponse;
var myxml : XmlTextReader;
rq = WebRequest.Create(“http://www.google.com”);
rs = rq.GetResponse();
myxml = new XmlTextReader( “http://url.to.content/content.xml” );
myxml.Read();
Both the WebRequest and the XmlTextReader error out. I have tried this code in multiple projects, with different targets (standalone vs web) and in both C# and javascript all with the same results: Mac Works, Windows Doesn’t.
Any Ideas?