Currently I'm having problems getting this working in the Web Player. Please note this is working on the windows build. Does the WWW function work with the Web Player?
Also, putting this line of code in a c# script
string url = "http://www.google.com";
WWW www = new WWW(url);
while (!www.isDone) {} // --- I don't think this ever returns because it locks my browser.
// 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;
}
"You should not write loops that spin until download is done".