- Home /
Problem is not reproducible or outdated
Yield return request never returns
Currently I'm having a problem with my courotine which yield return actually never goes anywhere.. It just doesn't want to return in the Webplayer build. In the Editor it works perfectly fine, no problems yielding at all. This is my IEnumerator that i'm starting.
public IEnumerator CreateChannel(string ChannelName) {
string urlRequest = "http://hiddenForSecurityPurposes.com/game/AddChannel.aspx?ChannelName=" + ChannelName;
WWW request = new WWW(urlRequest);
yield return request;
//It never reaches here.. It runs this IEnumerator, but the yield return never returns itself.
print("It got yielded");
}
Again, quick note. This does work fully out in the Editor, but not in Webplayer, which is what I'm exporting my game to.
If your webplayer is running on a webserver/host at the moment you might want to read up on the security sandbox of unity webplayer.
I did, I have the crossdomain.xml file in the root of my webserver which is also ASCII of type. So no problems there
Did you make sure the URL is correct? This may also need to be a WWWForm
URL is definitely correct. I'm positive it shouldn't be a WWWForm since that wouldn't make sense for my purpose. It works in Editor, therefore it should also indicate something in the Webplayer. After more research I found this thread that also had the problem a few years ago, but says it was fixed in Unity 3.0.. Clearly it hasn't. http://answers.unity3d.com/questions/154299/yield-return-request-never-returns.html
Hmmm, then I'm not sure what I could do to help you, did you try restarting unity? Some problems seem to get fixed upon restarting. Sorry, forgot you were running the webplayer, never$$anonymous$$d.
Follow this Question
Related Questions
WWW Request runs in Editor but not in Webplayer 1 Answer
How to optimize the build game for unity webplayer? 1 Answer
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers