private void CatchLog(string v)
{
string path = null;
if (Application.platform != RuntimePlatform.Android)
{
path = @"E:\Log";
}
else
{
path = "sdcard/Log"; //storage/emulated/0
}
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
string filename = "/Pico" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt";
if (!File.Exists(path + filename))
{
File.Create(path + filename).Dispose();
}
StreamWriter sw = File.AppendText(path + filename);
sw.Write(v);
sw.Dispose();
}