Quantcast
Channel: Answers by "diabloroxx"
Viewing all articles
Browse latest Browse all 60

Answer by diabloroxx

$
0
0

use the example posted here:http://unity3d.com/support/documentation/ScriptReference/WWW.html

// 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".


Viewing all articles
Browse latest Browse all 60

Trending Articles