- Home /
www in web player and standalone
Are there differences in the way the www class works in the web player and in the standalone player? The same bit of code works in the editor/standalone player for downloading remote files and making web service calls; in the web player, web service calls don't work (files do).
A very simple example, invoked via StartCoroutine():
private IEnumerator GetFile(string FileName){
WWW www = new WWW(FileName);
yield return www;
text = www.data;
}
In general, are the differences between the web player and the stand-alone player documented anywhere?
Edit:
By "web service" I mean, basically: a remote function call. For instance, I may request a URL like "www.mydomain.com/functionName?param1=blah¶m2=blah", the server does some work, and returns xml.
Answer by jonas-echterhoff · Jan 27, 2010 at 03:18 PM
In general, the web plugin uses a different implementation of WWW then editor/standalone: the web plugin passes all www requests through the browser, whereas the standalone will use the curl library for it's WWW implementation.
The implementations should perform the same, though. I don't quite understand what you want to do. What are "web service calls"? What is FileName in that example given?
Answer by pavees · Feb 03, 2010 at 10:56 AM
Can u pls give me some details on how to call a Web services. Me being new to Unity Web application, i dont know even how to call a URL and a parameter with it. So could anyone give a proper way to call Web services.
check out the WWW class: http://unity3d.com/support/documentation/ScriptReference/WWW.html
not an answer in this thread, please post it as a new question.
Your answer
Follow this Question
Related Questions
Performance Differences in Standalone player versus Web Browser? 2 Answers
Play 2 Stand Alone Players At Same Time 1 Answer
Can compile and run in Standalone, but can't run in Web Player 0 Answers
unity3d read data from PostgreSQL 0 Answers
Is it possible to identify if a user is using webplayer or standalone? 1 Answer