summaryrefslogtreecommitdiff
path: root/WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs
diff options
context:
space:
mode:
Diffstat (limited to 'WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs')
-rw-r--r--WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs b/WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs
index 3ce2663..ae5a132 100644
--- a/WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs
+++ b/WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs
@@ -13,6 +13,12 @@ public static class CommonFunction
File.Delete(file);
}
+ string dir = Path.GetDirectoryName(file);
+ if(!Directory.Exists(dir))
+ {
+ Directory.CreateDirectory(dir);
+ }
+
File.WriteAllText(file, content);
}