x


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

more ▼

asked Feb 14 '11 at 10:08 PM

Brett 2 gravatar image

Brett 2
1 1 1 1

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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 =)

more ▼

answered Feb 14 '11 at 10:29 PM

tertle gravatar image

tertle
1.1k 15 18 33

Thank you so much!!

Feb 14 '11 at 10:48 PM Brett 2
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1952
x527
x256
x70
x34

asked: Feb 14 '11 at 10:08 PM

Seen: 2359 times

Last Updated: Feb 14 '11 at 10:08 PM