- Home /
Can you instruct a game to download textures and write these textures into the game for next time?
Hi all, I've written some games for iPad and I'm looking for a solution to the following task;
I want the user of the iPad game to be able to download new textures from the web whilst playing the game (I know how to achieve this bit of the problem). Then have these textures applied to the game and saved in the game so that when the user quits the game and goes back later, the downloaded textures are still there - hard written into the game without the need to connect to the www again and re-download.
Make sense? Any ideas gratefully received...
Best regards, James.
Answer by robertbu · May 02, 2013 at 02:35 PM
No, you cannot add the textures to the game. You can convert them to PNGs, save them to local storage of the device and then load reload them using WWW with "file://" in the URL when the game restarts.
See:
Hi Robertbu, I thought as much, thanks for your input.
$$anonymous$$y issue now would be the lack of file structure on iOS; my plan would be to allow the user to download texture from a URL (using Safari etc) dump it in Photos and then when the Unity game boots up, call a function to incorporate the downloaded textures into the game.
But, how would I point to the downloaded textures when iOS has no file structure??
Any thoughts?
Cheers, James.
You will need to write or buy a plugin in order to access photos in iOS. Prime31's Etcetera plugin I believe will do the job.