Search Unity

Download sprite and save it for offline use?

Discussion in 'Scripting' started by FirebladeBR, Sep 23, 2014.

  1. FirebladeBR

    FirebladeBR

    Joined:
    Apr 21, 2014
    Posts:
    65
    Hi,

    I am new to unity3d, but i was searching the foruns and the web for a way to download an image as a sprite and then saving it for an offline use. I read about the www method but i did not find anything after that. Do I have to use a database to store the files? Or is there a better way to do it?

    Thanks,
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    You can use standard IO functions such as WriteAllBytes; see the code example here.

    --Eric