error on WWW

I got this error Assets/TitleGUI.js(41,17): BCE0020: An instance of type ‘UnityEngine.WWW’ is required to access non static member ‘isDone’.

if (WWW.isDone)
{
print(“DL complete”);
}

Tried to get if the download from the server is completed but it don’t work. Need help thx

if(instancename.isDone)

thx appels, 1 more question, do any1 know how to set the location of the downloaded files from the server?

the string you put in WWW defines the full path to the file to download.

after its downloaded its no longer on the server but on the client (the client does not run on the server)

So how do I set the location i wanted so that it is downloaded to the location. Currently I download the files but i get an error saying the system cannot find the file specified. Thus i thought the error is caused due to the location.

The downloaded content isn’t “on” the client, nor “downloaded to a location”. It exists as part of the WWW instances “text” or “bytes” or “texture” etc properties.

// Get the latest webcam shot from outside "Friday's" in Times Square
var url = "http://images.earthcam.com/ec_metros/ourcams/fridays.jpg";
function Start () {
// Start a download of the given URL
var www : WWW = new WWW (url);

// Wait for download to complete
yield www;

// assign texture
renderer.material.mainTexture = www.texture;
}

protip: click here

If you arent using the web-player and you desire to actually save a downloaded file to disk

Take a look at the Mono System.IO.File class(es)

http://www.go-mono.com/docs/index.aspx?tlink=38@ecma:314%23File/

In particular
http://www.go-mono.com/docs/index.aspx?link=M:System.IO.File.WriteAllBytes(System.String,System.Byte[ ])

will point you in an easy direction to writing files to disk after a WWW download has finished.

Again please note: this does not work with Unity Web Player. If you absolute have to store information locally with Unity Web Player you can use PlayerPrefs.