The problem with that is that I won’t know what the drive is, that’s why I’m using Application.dataPath. The Windows code works fine when I use it for writing a screen shot or reading a data file, but launching a web page it doesn’t work.
Just curious (as I don’t have currently access to Windows with Unity apps, but will be trying something like you soon), what is the value of string “Application.dataPath”? Does it contain the full path including drive letter in Windows?
I’ve got everything but converting backwards slashes to forward slashes working. I tried this:
NewURL = Regex.Replace(newURL, "\", "%47");
but it results in errors. I tried it without converting the backwards slashes and it seems to work with Firefox on Windows XP. Do you know if having mixed forward + backward slashes will be a problem for other browsers? If so, any hints on how to convert this?
OK, I figured it out…since \ is an escape character, you need \ to actually represent a , but since \ is also an escape character in regular expressions, you need \ to match a \ there too. Got that?