Unity – WWW – Get an Image from Web
1. MAIN TOP MENU> File> New Project…
2. MAIN TOP MENU> GameObject> Create Other> Cube
3. Hierarchy> select Cube> Inspectot> ‘Add component’> New Script> JavaScript> name it LoadImage.js
4. LoadImage.js
#pragma strict // Get the image var url = "http://www.lucedigitale.com/principale/images/logo.png"; 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; }
5. TOP Play button to see the final result
—
Reference:
http://docs.unity3d.com/Documentation/ScriptReference/WWW.html