- Home /
Creating temporary files in webplayer ?
Hello community =) I'm creating an app that allow the easy creation of scenes (just like the Sim's house building thingie). In this context I can store my newly created scene into a XML, then I can obtain the scene by parsing it, this works like a charm. However, I can't use this while it is deployed on the server since I use the streamwriter class and I believe I can't write like this on the server (due to the webplayer's sandbox). I need to write a temporary XML on a path (I'll later use this very XML to create an textasset and then an assetbundle).
Answer by Kryptos · Jul 30, 2012 at 07:49 AM
You can certainly write something on the server side. The sandbox only prevents from accessing the file system on the client side.
To do that you will have to use WWW and WWWForm to post your XML file to a script on your server (for example a .php or .cgi).
Hello, thanks for considering my question :).
Could you please give a short example of how to create a helloworld textfile in any location ? :/
Or does it mean that I have to create a short php script that will write the file with the content I post ?
does it mean that I have to create a short php script that will write the file with the content I post
Yes you will need something like that.