14 internal static string directory;
16 public static string GetPath(
string extension)
18 if (directory ==
null)
20 var editor = Application.platform == RuntimePlatform.OSXEditor ||
21 Application.platform == RuntimePlatform.WindowsEditor;
22 directory = editor ?
Directory.GetCurrentDirectory() : Application.persistentDataPath;
25 var timestamp = DateTime.Now.ToString(
"yyyy_MM_dd_HH_mm_ss_fff");
26 var name = $
"recording_{timestamp}{extension}";
27 var path = Path.Combine(directory, name);