Exporting for Webplayer gives library errors

Hi

I just wanted to deploy my game as a Webplayer application but when building (and only then), I will get the following errors in the editor:

Assets/scripts/SavegameManager.cs(63,48): error CS1061: Type System.IO.FileInfo' does not contain a definition for OpenText’ and no extension method OpenText' of type System.IO.FileInfo’ could be found (are you missing a using directive or an assembly reference?)
and
Assets/scripts/SavegameManager.cs(149,22): error CS0117: System.IO.File' does not contain a definition for WriteAllText’

So far I understood it may have to do with library versions but these operations look pretty basic to me and they worked when testing locally. No compile errors in MonoDevelop.

Any idea what is going on here?

My guess would be that whatever your SavegameManager is hitting the webplayer security sandbox restrictions. It can’t just read and write arbitrary files from disk.

but it has its container, right?

I mean, whereever he wants to save or load, it is not up to me to decide the exact location, right?
Then, if this doesn’t work, what do I need to do to tell him how to read or write files? This doesn’t seem like a very special case :wink:

OK I read that it is complicated to read/write sth from/to files.
I can live without that for now, since I just wanna upload a demo of my game which doesnt necessarily need such a load/save function.

BUT

now it is exported, when using “Build And Run”, it opens my browser and show me the MenuScene. But it only displays a particle effect that I have for background. There is no GUI at all :frowning:

2237247--149191--err.png

moved my project to 5.0.2p4, so this very problem doesnt occur anymore.

Still open is the question how a WebPlayer is accessing files. I’d expect that it still has a datapath which is not violating the sandbox. So what’s the way to go when loading/saving via WebPlayer?