hi i am tring to download an image and put it as a texture to a cube. i always get timeout.
i am working on a mac, network emulation is set to broadband
my code is
private var url = "http://unity-tutorials.com/forum/images/avatars/10780705364a649618747b0.jpg";
function Start () {
Debug.Log("inicio");
// Start a download of the given URL
var www : WWW = new WWW (url);
Debug.Log("new");
// Wait for download to complete
yield www;
Debug.Log("yield");
print([url]www.error);[/url]
// assign texture
renderer.material.mainTexture = [url]www.texture;[/url]
}
i always get this:
You are trying to load data from a www stream which had the following error when downloading.
Resolving host timed out: unity-tutorials.com
UnityEngine.WWW:get_texture()
$:MoveNext() (at Assets/myscripts/webclient.js:34)
i tryed with differents urls (many on different servers)
@francksitbon how did you go mate? Have you tried it on different servers at all?
I find I can successfully store and retrieve with my perl and cg scripts on my server when accessed through a html page in a browser. But using WWW in the Unity editor I cannot achieve storage of retrieval. I’ve tried storing binary form and SQL data following other people’s examples and tutorials, no dice…
A restart solved the issue for me to. I think Unity got itself stuck in a state when my internet was disconnected and it didn’t recover even though I was already back online. Latest 4.6.1f.