Search Unity

WWW always gives me timeout

Discussion in 'Editor & General Support' started by ddfire, Jan 5, 2011.

  1. ddfire

    ddfire

    Joined:
    Dec 22, 2010
    Posts:
    53
    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


    Code (csharp):
    1.  
    2. private var url = "http://unity-tutorials.com/forum/images/avatars/10780705364a649618747b0.jpg";
    3. function Start () {
    4.     Debug.Log("inicio");
    5.     // Start a download of the given URL
    6.     var www : WWW = new WWW (url);
    7.     Debug.Log("new");
    8.     // Wait for download to complete
    9.     yield www;
    10.     Debug.Log("yield");
    11.     print([url]www.error);[/url]
    12.     // assign texture
    13.     renderer.material.mainTexture = [url]www.texture;[/url]
    14. }
    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)

    any idea link pdf or anything?
    thanks!!!!!!
    David
     
  2. Iamdain

    Iamdain

    Joined:
    Feb 3, 2010
    Posts:
    90
    Hi mate did you ever find a solution for this? I'm having the same issue..
     
  3. francksitbon

    francksitbon

    Joined:
    Jan 22, 2010
    Posts:
    268
    hi Guys,

    Last version of Unity

    Same problem here, time out errors.

    Is there a way to avoid these errors or relaunch the www download?

    I tryed with www.isDone but the timeout is still there in random

    Franck
     
    Last edited: Sep 23, 2011
  4. Iamdain

    Iamdain

    Joined:
    Feb 3, 2010
    Posts:
    90
    @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...
     
  5. seba-123

    seba-123

    Joined:
    Sep 20, 2013
    Posts:
    1
    A restart of unity solved this problem on my machine.
     
  6. funx

    funx

    Joined:
    Jun 9, 2014
    Posts:
    16
    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.
     
  7. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    Is there a better solution than restarting everytime? :(