IEnumerator Tests() { text.text = ""; string dir = Application.persistentDataPath + "/TestDiskUtils/"; string storePath = Application.persistentDataPath + "/TestDiskUtils/Test.txt"; #if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN foreach (string drive in DiskUtils.GetDriveNames()) { if (drive != "C:/") { dir = drive + "TestDiskUtils/"; storePath = drive + "TestDiskUtils/Test.txt"; } PrintDebugLn(); PrintDebugLn(">>> NOW TESTING ON DRIVE " + drive + " <<<"); #endif if (!Directory.Exists(dir)) { Directory.CreateDirectory(dir); } if (File.Exists(storePath)) { File.Delete(storePath); } PrintStorageStats( #if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN drive #endif ); if (!Directory.Exists(dir)) { Directory.CreateDirectory(dir); } DiskUtils.SaveFile(obj, storePath); PrintDebugLn("===== FILE ADDED!!! (Test File is around 3-4 MB) ====="); PrintStorageStats( #if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN drive #endif ); if (File.Exists(storePath)) { File.Delete(storePath); PrintDebugLn("===== FILE DELETED!!! ====="); } else { PrintDebugLn("===== File not found: most likely also failed on create ====="); } PrintStorageStats( #if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN drive #endif ); #if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN } #endif yield return(null); }