Is it possible to read or write files in Windows 8 without using a plugin?
for Windows 8/10 App store , there is only 1 name space UnityEngine.Windows
that you should see those 2 classes :
UnityEngine.Windows.File
UnityEngine.Windows.directory
this is the only way to write or read a file on Windows Universal App
http://docs.unity3d.com/Documentation/ScriptReference/Windows.File.html
http://docs.unity3d.com/Documentation/ScriptReference/Windows.Directory.html
http://docs.unity3d.com/Documentation/ScriptReference/Windows.Crypto.html
public class FileIO : MonoBehaviour {
public static void CreateFile(string path, string fileName){
if(!File.Exists(path+“/”+fileName)){
File.Create(path+“/”+fileName).Dispose();
}
}
public static void WriteFile(string path,string fileName,string data){
if(File.Exists(path+“/”+fileName)){
StreamWriter sw = new StreamWriter(path+“/”+fileName);
sw.WriteLine(data);
sw.Flush();
sw.Close();
}
}
public static string ReadFile(string path,string fileName){
string output=“”;
if(File.Exists(path+“/”+fileName)){
StreamReader sr = new StreamReader(path+“/”+fileName);
output=sr.ReadLine();
sr.Close();
}
return output;
}
}