Quantcast
Channel: Questions in topic: "webgl"
Viewing all articles
Browse latest Browse all 2390

How to read and rewrite text files on a local host with WebGL?

$
0
0
Hi guys, I'm making a game where the levels are generated by several parameters, which are saved on an external text file. The user's choices in the game are saved as numbers on a second text file. I'm using C#, and call these files with (for example): string fileName1 = Application.dataPath + @"\TempVars.txt"; string fileData = System.IO.File.ReadAllText(fileName1); And it works perfectly on a PC build. But, I need this game on the web, and that's where I'm stuck. I understood that I need to use the WWW class in order to call these file on a host, but I can't figure out how to use it. (I'm trying it on a local host, and I can't seem to turn the www class to a string or to reverse the process) Can someone please explain to me how exactly to READ and REWRITE text files, that are on the local host with the webplayer? Or at least refer for a good guide on how to it. Thanks!

Viewing all articles
Browse latest Browse all 2390

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>