I am trying to load a binary data file from an external server via the WWW class. This works well in the editor, but in the WebPlayer the download never finishes and its progress is always 0. Are there any limitations in the WebPlayer that I should be aware of(eg. can't load binary files or similar)?
I am aware that there was a similar question here, but that was solved by prefixing the url with http:// which I already did.
Edit: I found out that the problem has to do with the way I'm waiting for the download to finish. Instead of yielding the www result to wait for it to finish I just do something like that:
WWW download = new WWW(url);
while(!download.isDone){}
Debug.Log(download.data);
This doesn't work in the Webplayer somehow. I don't know why, but it does work when I change this to the usual:
WWW download = new WWW(url);
yield return download;
Debug.Log(download.data);
The problem with that however is that the download takes place in a piece of code that isn't a MonoBehaviour, so I can't start a Coroutine (i'm using c-sharp) for the download, or at least that would require some major refactoring, which I'd like to avoid if possible. Any ideas on this?
Oh, and as some people already asked, yes I am sure, that the server is up, reachable and serves the file as it's supposed to, because the exact same code with the exact same url is working fine in editor and standalone. Plus it doesn't seem to be a problem with a certain file type, as this happens with html xml midi text and custom binary files. (I tried them all because I ran out of ideas...)