i’m trying to call this function Directory.GetFiles(path), but in unity browser isn’t possible, any alternatives that can i try?
PD: I call Directory.GetFiles(path) to get the name of all files in the chosen path.
Thank you!
i’m trying to call this function Directory.GetFiles(path), but in unity browser isn’t possible, any alternatives that can i try?
PD: I call Directory.GetFiles(path) to get the name of all files in the chosen path.
Thank you!
this might be related to your project build type… if its a web target, you dont have file access. try changing it to executable or iOS or Android project (if you have license) then see if it works
if i change to Android project or iOS it works correctly, the problem is with the unity browser that i can’t open files.
if you are talking about a web/internet browser build, you can’t do file access. For the safety of people’s machines everywhere, programs that run in web windows are not aloud to write to files on a user’s machine.
Only Executables are aloud, and it is allowed on iOS and android as the file access area is restricted in the OS, so you can’t do harm to those devices.
Browser/web version can stream files/bundles from web server though.
thank you for the explanation. I’ll try to search an alternative to do this.