- Home /
 
WWW is not ready downloading yet?
import UnityEngine
 
               class testXML(MonoBehaviour): 
 
               def Start(): Helper()
  
               def Helper(): 
 xmlURL = "http://files.unity3d.com/tom/orbitsim/XML/SolarSystem.xml" tWWW as WWW = WWW(xmlURL) yield tWWW guiText.text = tWWW.text 
My guess is it's not downloading the XML file. I get the error "WWW is not ready downloading yet" if I comment out "yield tWWW", otherwise it just hangs. I am trying to parse an XML file in Boo, but I can't even get past the first part. Any ideas?
Thanks
Answer by tertle · Feb 14, 2011 at 10:29 PM
Because yield requires a coroutine to work.
import UnityEngine
 
               class testXML(MonoBehaviour): 
 
               def Start(): StartCoroutine(Helper());
 
               def Helper(): 
 xmlURL = "http://files.unity3d.com/tom/orbitsim/XML/SolarSystem.xml" tWWW as WWW = WWW(xmlURL) yield tWWW guiText.text = tWWW.text 
 
               
               Props on using Boo =)
Your answer