File.Exists on webplayer does nothing

Hello =)
I am creating a scene using a XML I parse, it works like a charm in the editor, but once I create a webplayer, it does nothing, by creating a custom-made debug window, it looks like the File.Exists fonction does not end properly since the following code:


    if (File.Exists(path))
        ShowRoom.Log("Not OK");
    StreamReader myReader = new StreamReader(path);
    ShowRoom.Log("Finished parsing");

Have the output:
And nothing else…
If the function had worked, it would have done “Start OK/NOT OK” and then “Finished Parsing”
My debug function is fine (for what I want at least).
The paths are relative, and files are correctly placed (and even if they weren’t, i’d have the “NOT OK” and then player would crash).

If anyone has a suggestion…any kind of help would be appreciated :slight_smile:

Access to the local machine’s file system is prohibited in web builds due to the security sandbox it runs in. And for good reason, see link:

I’m guessing it’s probably throwing an exception when you attempt to use anything in the File namespace. If your web build has a log file, check it out, it probably posted the exception to that.

Aw thanks, however that seems quite out of my range at the moment…
As far as I understand, I need to put crossdomain.xml with the correct data that allows my webplayer to access the local data, is that so ? Where is it supposed to be placed ? (in the case of my actual local usage, I believe it will be placed in the apache home on the server later on , am i right ?)